Programming is fun if you have the passion and time for it. I became bored, quarantined in my place, scripted some codes in C++. Only if they would come to reality. If you are aware of Artificial Intelligence, this may entice you. Let's have some fun fellow geeks, copy and run in your devices. The good thing is that you can even run it on your Android device but of course with a special editor app called CppDroid. Leave a comment or question in the comments section below.
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
int year,future;
char reb,skip;
string user;
cout<<"Enter first name: ";
getline(cin,user);
cout<<endl<<endl<<"Welcome to Sam's year debugger"<<endl;
cout<<"You are logged in as "<<user<<endl;
yenter:
cout<<endl<<"Enter current year: ";
cin>>year;
if(year!=2020)
{if(year<2020)
{cout<<year<<" cannot be the current year!";goto yenter;}
else
{cout<<endl<<"Checking bugs in "<<year<<endl<<"Debug complete!!"<<endl<<endl;
cout<<year<<" is ok"<<endl;}}
else
{cout<<endl<<"Am sorry "<<user<<",but "<<year<<" is not compatible for humans, do you wish to skip this year? (y/n)...";
cin>>skip;
if(skip=='y')
{
futurerep:
cout<<endl<<"Enter the year in future you wish to jump to: ";
cin>>future;
if(future==2020||future<2020)
{cout<<endl<<"You cannot select "<<future<<endl<<endl;
cout<<"Please Re-enter future year again"<<endl;goto futurerep;}
else
{cout<<endl<<"Checking "<<future<<" statistics"<<endl<<endl;
cout<<future<<" loading..."<<endl<<"100%loaded"<<endl<<endl;
cout<<"Welcome "<<user<<" to "<<future;}
}
else if(skip=='n')
{
cout<<endl<<"Do you wish to reboot this year?(y/n)...";
cin>>reb;
if(reb=='y')
{
cout<<endl<<"Rebooting 2020..."<<endl<<"Cleaning viruses..."<<endl<<"Alert!! COVID-19 Detected!!!"<<endl;
cout<<endl<<"COVID-19 Cleared out of memmory!"<<endl;
cout<<endl<<"Desert Locusts detected!!"<<endl<<"Cleaning Locusts"<<endl<<"100% Locusts cleaned"<<endl;
cout<<endl<<endl<<"Initillizing 2019 recovery mode..."<<endl<<"Loading 2019 goodies"<<endl<<"2019 recovery and load complete!!"<<endl<<endl;
cout<<user<<", welcome back to 2019!!";
}
else
{
cout<<year<<" cant load, body system may crush!";}
}}
return 0;}
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
int year,future;
char reb,skip;
string user;
cout<<"Enter first name: ";
getline(cin,user);
cout<<endl<<endl<<"Welcome to Sam's year debugger"<<endl;
cout<<"You are logged in as "<<user<<endl;
yenter:
cout<<endl<<"Enter current year: ";
cin>>year;
if(year!=2020)
{if(year<2020)
{cout<<year<<" cannot be the current year!";goto yenter;}
else
{cout<<endl<<"Checking bugs in "<<year<<endl<<"Debug complete!!"<<endl<<endl;
cout<<year<<" is ok"<<endl;}}
else
{cout<<endl<<"Am sorry "<<user<<",but "<<year<<" is not compatible for humans, do you wish to skip this year? (y/n)...";
cin>>skip;
if(skip=='y')
{
futurerep:
cout<<endl<<"Enter the year in future you wish to jump to: ";
cin>>future;
if(future==2020||future<2020)
{cout<<endl<<"You cannot select "<<future<<endl<<endl;
cout<<"Please Re-enter future year again"<<endl;goto futurerep;}
else
{cout<<endl<<"Checking "<<future<<" statistics"<<endl<<endl;
cout<<future<<" loading..."<<endl<<"100%loaded"<<endl<<endl;
cout<<"Welcome "<<user<<" to "<<future;}
}
else if(skip=='n')
{
cout<<endl<<"Do you wish to reboot this year?(y/n)...";
cin>>reb;
if(reb=='y')
{
cout<<endl<<"Rebooting 2020..."<<endl<<"Cleaning viruses..."<<endl<<"Alert!! COVID-19 Detected!!!"<<endl;
cout<<endl<<"COVID-19 Cleared out of memmory!"<<endl;
cout<<endl<<"Desert Locusts detected!!"<<endl<<"Cleaning Locusts"<<endl<<"100% Locusts cleaned"<<endl;
cout<<endl<<endl<<"Initillizing 2019 recovery mode..."<<endl<<"Loading 2019 goodies"<<endl<<"2019 recovery and load complete!!"<<endl<<endl;
cout<<user<<", welcome back to 2019!!";
}
else
{
cout<<year<<" cant load, body system may crush!";}
}}
return 0;}
Comments
Post a Comment