Tuesday, 4 August 2020

Program.cxx


#include <stdio.h>
#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;
}

AboutAndCredits

About:

1. Hello This is simple user interactive "Menu Bot".

2. This menu bot is made using c and c++ headerfiles.

3. I have used GCC compiler to build this program.

4. This program only works in linux and other flavours of linux which support "apt".

5. In this program i have just used system resources that are available in linux.

6. This program is not an A.I program.

Credits:

1. This program is made by Sahil Bhandari.

2. And i have a passion of doing programming.

3. And this program is not a team work.

4. Copyright and reverse engineering of the program is strictly prohibited.

5. Ask permission before making changes and uploading.

6. This program is not free, so don't do piracy.


Warnings:

1. Use this program peacefully.

2. Follow the instructions in the program.

3. If you don't know how to use this program better press "CTRL + C" to exit this program.

4. This program is user friendly but, if you still don't know how to use it better don't use the                     program as this program is made with many tactits and logics.

5. It feels hurt me when you people destroys my work...