#include <string.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
int main (void)
{
int n,o,p;
char name[50], wai[]="Shailu Menu Bot 2.1";
printf("hey hi");
printf("\nEnter your name: ");
fgets(name,50,stdin);
system("clear");
printf("hi %s",name);
again:
printf("\nHey Here is the list that can i do for you...\n");
printf("\n1. What is your name ??");
printf("\n2. Who am i ??");
printf("\n3. Today's date");
printf("\n4. Calender of this month");
printf("\n5. Calculator");
printf("\n6. System Information");
printf("\n7. Games");
printf("\n8. Power Option");
printf("\n9. About And Credits");
printf("\n00. Exit");
printf("\n\nEnter your choice in number from above: ");
scanf("%d",&n);
switch (n)
{
case 1:
system("clear");
printf("your name %s", name);
goto again;
break;
case 2:
system("clear");
printf("i am %s\n", wai);
goto again;
break;
case 3:
system("clear");
system("date");
goto again;
break;
case 4:
system("clear");
system("cal");
printf("\n");
goto again;
break;
case 5:
system("clear");
system("sudo apt install apcalc -y");
system("clear");
system("calc");
system("clear");
goto again;
break;
case 6:
system("clear");
system("sudo apt-get install neofetch -y");
system("clear");
system("neofetch");
goto again;
break;
case 7:
system("clear");
game:
printf("Here is list of games Which u can install and play\n");
printf("\n1. Xonotic (Best of all time).\n");
printf("2. Never Ball\n");
printf("3. Chess\n");
printf("00. Main menu\n");
printf("\nEnter the number from the above option: ");
scanf("%d",&o);
switch (o)
{
case 1:
system("clear");
system("sudo snap install xonotic");
system("clear");
system("xonotic");
goto game;
break;
case 2:
system("clear");
system("sudo apt-get install neverball");
system("clear");
system("neverball");
goto game;
break;
case 3:
system("clear");
system("sudo apt-get install pychess");
system("clear");
system("pychess");
goto game;
break;
case 00:
system("clear");
goto again;
break;
default:
system("clear");
cerr<<"\nNo such option found."<<endl;
goto game;
break;
}
goto again;
break;
case 8:
system("clear");
power:
printf("Here is the power option you can select according to you.\n");
printf("\n1. Shutdown\n");
printf("2. Reboot\n");
printf("3. Halt\n");
printf("00. Main Menu\n");
printf("\nEnter the number from the above option: ");
scanf("%d",&p);
switch (p)
{
case 1:
system("clear");
system("sudo shutdown now");
break;
case 2:
system("clear");
system("sudo reboot");
break;
case 3:
system("clear");
system("sudo halt");
break;
case 00:
system("clear");
goto again;
break;
default:
system("clear");
cerr<<"\nNo such option found"<<endl;
goto power;
break;
}
case 9:
system("clear");
system("cd /");
system("cd /home/sahil/C++");
system("nano AboutAndCredits");
goto again;
break;
case 00:
system("clear");
printf("Good Bye....");
system("exit");
break;
default:
system("clear");
cerr<<"No such Option found."<<endl;
goto again;
break;
}
return 0;
}