#include <stdio.h>
int main()
{
int password;
int sign_password;
char intype;
int directory = 2;
// 1
void CreatePassword()
{
system("clear");
printf("\nCreate your password: ");
scanf("%d", &password);
while (1)
{
printf("Password is created.\nRecreate password?\n\n1.Yes\t2.No\t");
scanf("%d", &intype);
if (intype == 1)
{
CreatePassword();
}
if (intype == 2)
{
break;
directory = 2;
}
else
{
printf("\nUnknown command!\n ");
}
}
}
void CommandLine()
{
printf("$CMD: ");
scanf("%d", &intype);
}
void Terminal()
{
while (1)
{
// Directory system
switch (directory)
{
case 1:
CreatePassword();
case 2:
CommandLine();
}
}
}
Terminal();
}
scanf("%d", &password);
if (intype == 2)
{
break;
directory = 2;
}