Advertisement
zaman360live

AAAMit Sir

Aug 10th, 2021
1,046
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 15.09 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<conio.h>
  3. #include<ctype.h>
  4. #include<stdlib.h>
  5. #include<string.h>
  6.  
  7. void about();
  8. void help();
  9. int main()
  10. {
  11.   /* int countr,r,r1,count,i,n;
  12.   float score;
  13.   char choice;
  14.   char playername[20]; */
  15.   typedef struct aisystem
  16.   {
  17.     int countr,r,r1,count,i,n;
  18.     float score;
  19.     char choice;
  20.     char playername[20];
  21.   }z_ai; //z means Zaman AI
  22.     z_ai zaman;
  23.      mainhome:
  24.      system("cls");
  25.    
  26.      printf("\n\t\t   WELCOME to ZaMaN's c-AI!!!!!!!!!!    ");
  27.      printf("\n\t\t________________________________________");
  28.      printf("\n\t\t________________________________________");
  29.      printf("\n\t\t > Press S to Enter to The Program      ");
  30.      printf("\n\t\t > Press H for Help                     ");
  31.      printf("\n\t\t > press A for About Developer          ");
  32.      printf("\n\t\t > press Q to quit                      ");
  33.      printf("\n\t\t________________________________________\n\n");
  34.      zaman.choice=toupper(getch());
  35.      if (zaman.choice=='A')
  36.         {
  37.         about();
  38.         goto mainhome;
  39.         }
  40.      else if (zaman.choice=='H')
  41.         {
  42.         help();getch();
  43.         goto mainhome;
  44.         }
  45.         else if (zaman.choice=='Q')
  46.         exit(1);
  47.       else if(zaman.choice=='S')
  48.       {
  49.       system("cls");
  50.  
  51.       printf("\n\n\n\n\n\n\n\n\n\n\t\t\tResister your name:");
  52.       gets(zaman.playername);
  53.  
  54.       system("cls");
  55.       printf("\n ------------------  Welcome %s to ZaMaN's c-AI--------------------------",zaman.playername);
  56.       printf("\n\n Here are some tips for:          ");
  57.       printf("\n -------------------------------------------------------------------------");
  58.       printf("\n >> Your game starts with CHALLANGE ROUND. In this round you will be asked a");
  59.       printf("\n    total of 10 questions. Each right answer will be awarded $100,000!");
  60.       printf("\n    By this way you can win upto ONE MILLION cash prize!!!!!..........");
  61.       printf("\n >> You will be given 4 options and you have to press A, B ,C or D for the");
  62.       printf("\n    right option.");
  63.       printf("\n >> You will be asked questions continuously, till right answers are given");
  64.       printf("\n >> No negative marking for wrong answers!");
  65.       printf("\n\n\t!!!!!!!!!!!!! ALL THE BEST !!!!!!!!!!!!!");
  66.       printf("\n\n\n Press Y  to start the game!\n");
  67.       printf("\n Press any other key to return to the main menu!");  
  68.       }
  69.       if (toupper(getch())=='Y')
  70.             {
  71.             goto home;
  72.         }
  73.         else
  74.             {
  75.         goto mainhome;
  76.         system("cls");
  77.         }
  78.     home:
  79.     system("cls");
  80.     zaman.count=0;
  81.     for(zaman.i=1;zaman.i<=2;zaman.i++)
  82.     {
  83.       system("cls");
  84.       zaman.r1=zaman.i;
  85.       switch(zaman.r1)
  86.           {
  87.             case 1:
  88.             printf("\n\nWho is OUR CSE 122 class Teacher?");
  89.             printf("\n\nA.Amit Sir\t\tB. Zaman Sir\n\nC.Kobir Sirt\tD.Raju Sir");
  90.             if (toupper(getch())=='A')
  91.               {
  92.                 printf("\n\nCorrect!!!");zaman.count++;
  93.                 getch();
  94.                 break;
  95.         }
  96.             else
  97.                {
  98.                    printf("\n\nWrong!!! The correct answer Amit Sir");
  99.                    getch();
  100.                break;
  101.                }
  102.  
  103.         case 2:
  104.             printf("\n\n\nWhat is the full meaning of CSE?");
  105.             printf("\n\nA.Computer Science and Engineering\t\tB.WWW\n\nC.Daffodil\t\tD.Computer Science");
  106.             if (toupper(getch())=='A')
  107.                 {
  108.             printf("\n\nCorrect!!!");zaman.count++;
  109.               getch();
  110.               break;}
  111.             else
  112.             {
  113.            printf("\n\nWrong!!! The correct answer is A.Computer Science and Engineering");
  114.                getch();
  115.                break;
  116.         }
  117.       }
  118.     }
  119.  
  120.     if(zaman.count>=2)
  121.       {
  122.       goto test;
  123.     }
  124.       else
  125.       {
  126.       system("cls");
  127.       printf("\n\nHey Bro! See you not for mind. Relux and Get OUT");
  128.       getch();
  129.       goto mainhome;
  130.       }
  131.  
  132.     test:
  133.      system("cls");
  134.      printf("\n\n\t*** CONGRATULATION %s Bro! Lets Play ***",zaman.playername);
  135.      printf("\n\n\n\n\t!Press P to Start the Game!");
  136.      if(toupper(getch())=='P')
  137.           {
  138.         goto game;
  139.       }
  140.     game:
  141.  
  142.      zaman.countr=0;
  143.      for(zaman.i=1;zaman.i<=20;zaman.i++)
  144.      {
  145.        system("cls");
  146.      zaman.r=zaman.i;
  147.    
  148.      switch(zaman.r)
  149.         {
  150.         case 1:
  151.         printf("\n\n    --------- is the father of computer.?");
  152.         printf("\n\nA.Herman Hollerith\t\tB. Ada Byron\n\nC.Blaise Pascal\t\tD.Charles Babbage");
  153.         if (toupper(getch())=='D')
  154.             {printf("\n\nCorrect!!!");zaman.countr++;
  155.       getch();
  156.              break;
  157.        }
  158.         else
  159.            {printf("\n\nWrong!!! The correct answer is D.Charles Babbage");
  160.        getch();
  161.             goto scoreboard;
  162.             break;
  163.         }
  164.  
  165.     case 2:
  166.         printf("\n\n    A desktop computer is also known as__");
  167.         printf("\n\nA.PC\t\tB.Laptop\n\nC. Mainframe\t\tD.Palmtop");
  168.         if (toupper(getch())=='A')
  169.             {printf("\n\nCorrect!!!");zaman.countr++;
  170.       getch();
  171.              break;
  172.        }
  173.         else
  174.            {printf("\n\nWrong!!! The correct answer is A.PC");
  175.        getch();
  176.             goto scoreboard;
  177.             break;
  178.         }
  179.     case 3:
  180.         printf("\n\n    CPU is the --------- of computer.");
  181.         printf("\n\nA.Brain\t\tB.Ear\n\nC.Eye\t\tD.All above these");
  182.         if (toupper(getch())=='A')
  183.             {printf("\n\nCorrect!!!");zaman.countr++;
  184.       getch();
  185.              break;
  186.        getch();
  187.        }
  188.         else
  189.            {printf("\n\nWrong!!! The correct answer is A.Brain");
  190.        getch();
  191.             goto scoreboard;
  192.             break;
  193.         }
  194.  
  195.     case 4:
  196.           printf("\n\n  Which of the following is not Computer Hardware?");
  197.           printf("\n\nA.Mouse\t\tB.Monitor\n\nC.Printer\t\tD.Antivirus");
  198.           if (toupper(getch())=='D')
  199.             {printf("\n\nCorrect!!!");zaman.countr++;
  200.       getch();
  201.              break;
  202.        getch();
  203.        }
  204.           else
  205.            {printf("\n\nWrong!!! The correct answer is D. Antivirus");
  206.        getch();
  207.             goto scoreboard;
  208.             break;
  209.         }
  210.    
  211.     case 5:
  212.           printf("\n\n Which of the following is an example of web browser?");
  213.           printf("\n\nA.C++\t\tB.Tally\n\nC.Wide area network\t\tD.None of these");
  214.           if (toupper(getch())=='C')
  215.             {printf("\n\nCorrect!!!");zaman.countr++;
  216.       getch();
  217.              break;
  218.        getch();
  219.        }
  220.           else
  221.            {printf("\n\nWrong!!! The correct answer is C. Wide area network");
  222.        getch();
  223.             goto scoreboard;
  224.             break;
  225.         }
  226.  
  227.     case 6:
  228.           printf("\n\n  What of these full form of e-mail?");
  229.           printf("\n\nA.Electric mail\t\tB.Electromagnetic mail\n\nC.Electronic mail\t\tD.None of these");
  230.           if (toupper(getch())=='C')
  231.             {printf("\n\nCorrect!!!");zaman.countr++;
  232.       getch();
  233.              break;
  234.        getch();
  235.        }
  236.           else
  237.            {printf("\n\nWrong!!! The correct answer is C. Electronic mail");
  238.        getch();
  239.             goto scoreboard;
  240.             break;
  241.         }
  242.     case 7:
  243.           printf("\n\n  Which one of the following is not a computer language?");
  244.           printf("\n\nA.BASIC\t\tB. C\n\nC. Fast\t\tD.FORTRAN");
  245.           if (toupper(getch())=='C')
  246.             {printf("\n\nCorrect!!!");zaman.countr++;
  247.       getch();
  248.              break;
  249.        getch();
  250.        }
  251.           else
  252.            {printf("\n\nWrong!!! The correct answer is C. Fast");
  253.        getch();
  254.             goto scoreboard;
  255.             break;
  256.         }
  257.  
  258.  
  259.     case 8:
  260.           printf("\n\n  A -------- is a computer connected to two networks.");
  261.           printf("\n\nA.Server\t\tB.Gateway\n\nC.Bridge way\t\tD.Link");
  262.           if (toupper(getch())=='A')
  263.             {printf("\n\nCorrect!!!");zaman.countr++;
  264.       getch();
  265.              break;
  266.        getch();
  267.        }
  268.           else
  269.            {printf("\n\nWrong!!! The correct answer is A.Server");
  270.        getch();
  271.             goto scoreboard;
  272.             break;
  273.         }
  274.  
  275.     case 9:
  276.           printf("\n\n Who was the inventor and founder of www?");
  277.           printf("\n\nA.Russel\t\tB.Bill gates\n\nC.Lee N.Fiyong\t\tD.Tim Berners lee");
  278.           if (toupper(getch())=='D')
  279.             {printf("\n\nCorrect!!!");zaman.countr++;
  280.       getch();
  281.              break;
  282.        getch();
  283.        }
  284.           else
  285.            {printf("\n\nWrong!!! The correct answer is D.Tim Berners lee");
  286.        getch();
  287.             goto scoreboard;
  288.             break;
  289.         }
  290.  
  291.     case 10:
  292.           printf("\n\n How many kilobytes make a megabyte?");
  293.           printf("\n\nA.256\t\tB. 512\n\nC. 1024\t\tD.2048");
  294.           if (toupper(getch())=='C')
  295.             {printf("\n\nCorrect!!!");zaman.countr++;
  296.       getch();
  297.              break;
  298.        getch();
  299.        }
  300.           else
  301.            {printf("\n\nWrong!!! The correct answer is C. 1024");
  302.        getch();
  303.             goto scoreboard;
  304.             break;
  305.         }
  306.  
  307.     case 11:
  308.           printf("\n\n  IBM stands for.");
  309.           printf("\n\nA.Indian Business Machine\t\tB.Internal Business Machine\n\nC.International Business Machine\t\tD.Integrated Business Machine");
  310.           if (toupper(getch())=='B')
  311.             {printf("\n\nCorrect!!!");zaman.countr++;
  312.       getch();
  313.              break;
  314.        getch();
  315.        }
  316.           else
  317.            {printf("\n\nWrong!!! The correct answer is B. Internal Business Machine");
  318.        getch();
  319.             goto scoreboard;
  320.             break;
  321.         }
  322.  
  323.     case 12:
  324.           printf("\n\n ___ is used in fourth generation computer.");
  325.           printf("\n\nA.Transistors\t\tB.Vacuum tubes\n\nC.Microprocessor\t\tD.Integrated circuit");
  326.           if (toupper(getch())=='C')
  327.             {printf("\n\nCorrect!!!");zaman.countr++;
  328.       getch();
  329.              break;
  330.        getch();
  331.        }
  332.           else
  333.            {printf("\n\nWrong!!! The correct answer is C. Microprocessor");
  334.        getch();
  335.             goto scoreboard;
  336.             break;
  337.         }
  338.  
  339.  
  340.     case 13:
  341.           printf("\n\n A _____ is a software application for retrieving, presenting and traversing information.");
  342.           printf("\n\nA.HTTP\t\tB.E-mail\n\nC.Web browser\t\tD.Search engine");
  343.           if (toupper(getch())=='C')
  344.             {printf("\n\nCorrect!!!");zaman.countr++;
  345.       getch();
  346.              break;
  347.        getch();
  348.        }
  349.           else
  350.            {printf("\n\nWrong!!! The correct answer is C. Web browser");
  351.        getch();
  352.             goto scoreboard;
  353.             break;
  354.         }
  355.  
  356.  
  357.     case 14:
  358.           printf("\n\n  An online backing storage system capable of storing larger quantities of data is");
  359.           printf("\n\nA.Temporary storage\t\tB.Secondary storage\n\nC.Mass storage\t\tD.Memory");
  360.           if (toupper(getch())=='C')
  361.             {printf("\n\nCorrect!!!");zaman.countr++;
  362.       getch();
  363.              break;
  364.        getch();
  365.        }
  366.           else
  367.            {printf("\n\nWrong!!! The correct answer is C. Mass storage");
  368.        getch();
  369.             goto scoreboard;
  370.             break;
  371.         }
  372.  
  373.  
  374.     case 15:
  375.           printf("\n\n  POST stands for");
  376.           printf("\n\nA.Power Off System Test\t\tB.Program On System Test\n\nC.Power On System Test\t\tD.Power On Self Test");
  377.           if (toupper(getch())=='D')
  378.             {printf("\n\nCorrect!!!");zaman.countr++;
  379.       getch();
  380.              break;
  381.        getch();
  382.        }
  383.           else
  384.            {printf("\n\nWrong!!! The correct answer is D. Power On Self Test");
  385.        getch();
  386.             goto scoreboard;
  387.             break;
  388.         }
  389.  
  390.     case 16:
  391.           printf("\n\n  Which is the first mechanical computer?.");
  392.           printf("\n\nA.The Babbage Difference Engine\t\tB.Abacus\n\nC.Super computer\t\tD.All above these");
  393.           if (toupper(getch())=='A')
  394.             {printf("\n\nCorrect!!!");zaman.countr++;
  395.       getch();
  396.              break;
  397.        getch();
  398.        }
  399.           else
  400.            {printf("\n\nWrong!!! The correct answer is A.The Babbage Difference Engine");
  401.        getch();
  402.             goto scoreboard;
  403.             break;
  404.         }
  405.     case 17:
  406.           printf("\n\n   MS-Word is an example of ___.");
  407.           printf("\n\nA. An operating system\t\tB.A processing device\n\nC.Application software \t\tD. An input device ");
  408.           if (toupper(getch())=='D')
  409.             {printf("\n\nCorrect!!!");zaman.countr++;
  410.       getch();
  411.              break;
  412.        getch();
  413.        }
  414.           else
  415.            {printf("\n\nWrong!!! The correct answer is  C.An input device ");
  416.        getch();
  417.             goto scoreboard;
  418.             break;
  419.         }
  420.  
  421.     case 18:
  422.           printf("\n\n  A computer cannot *boot* if it does not have the ___.");
  423.           printf("\n\nA.Compiler\t\tB) Loader \n\nC. Operating system\t\tD.Assembler");
  424.           if (toupper(getch())=='C')
  425.             {printf("\n\nCorrect!!!");zaman.countr++;
  426.       getch();
  427.              break;
  428.        getch();
  429.        }
  430.           else
  431.            {printf("\n\nWrong!!! The correct answer is C) Operating system ");
  432.        getch();
  433.             goto scoreboard;
  434.             break;
  435.         }
  436.     case 19:
  437.           printf("\n\nStorage capacity of magnetic disk depends on..    .");
  438.           printf("\n\nA.disk pack in disk surface \t\tB.tracks per inch of surface \n\nC.bits per inch of tracks \t\tD.All of the above ");
  439.           if (toupper(getch())=='D')
  440.             {printf("\n\nCorrect!!!");zaman.countr++;
  441.       getch();
  442.              break;
  443.        getch();
  444.        }
  445.           else
  446.            {printf("\n\nWrong!!! The correct answer is D. All of the above ");
  447.        getch();
  448.             goto scoreboard;
  449.             break;
  450.         }
  451.  
  452.       case 20:
  453.           printf("\n\nWhich key is used in combination with another key to perform a specific task?  .");
  454.           printf("\n\nA.Function\t\tB.Spacebar\n\nC.Arrow\t\tD.Control");
  455.           if (toupper(getch())=='D')
  456.             {printf("\n\nCorrect!!!");zaman.countr++;
  457.       getch();
  458.              break;
  459.        getch();
  460.        }
  461.           else
  462.            {printf("\n\nWrong!!! The correct answer is D. Control");
  463.        getch();
  464.             goto scoreboard;
  465.             break;
  466.         }
  467.     }
  468.  
  469.    
  470.     scoreboard:
  471.     {
  472.     system("cls");
  473.     printf("\n\n\t*********************Your Score*********************************");
  474.     printf("\n\n\t******Your Score is %d out of 20******************",zaman.countr);
  475.     getch();
  476.     go:
  477.       puts("\n\n Press Y if you want to play Again?");
  478.       puts("Press any key if you want to go main menu");
  479.       if (toupper(getch())=='Y')
  480.         goto home;
  481.       else{
  482.         goto mainhome;
  483.         }
  484.     }
  485.     /* getch();
  486.     goto mainhome;
  487.  
  488.     go:
  489.       puts("\n\n Press Y if you want to play Again?");
  490.       puts("Press any key if you want to go main menu");
  491.       if (toupper(getch())=='Y')
  492.         goto home;
  493.       else{
  494.         goto mainhome;} */
  495.   }
  496. }
  497.  
  498. void help()
  499.     {system("cls");
  500.     printf("\n\n                              HELP");
  501.     printf("\n -------------------------------------------------------------------------");
  502.     printf("\n ......................... Rules of ZaMaN AI...........");
  503.     printf("\n >> There are two rounds in the game, WARMUP ROUND & CHALLANGE ROUND");
  504.     printf("\n >> In warmup round you will be asked a total of 3 questions to test your general");
  505.     printf("\n    knowledge. You will be eligible to play the game if you can give atleast 2");
  506.     printf("\n    right answers otherwise you can't play the Game...........");
  507.     printf("\n >> Your game starts with the CHALLANGE ROUND. In this round you will be asked");
  508.     printf("\n    total 10 questions each right answer will be awarded $100,000.");
  509.     printf("\n    By this way you can win upto ONE MILLION cash prize in USD...............");
  510.     printf("\n >> You will be given 4 options and you have to press A, B ,C or D for the");
  511.     printf("\n    right option");
  512.     printf("\n >> You will be asked questions continuously if you keep giving the right answers.");
  513.     printf("\n >> No negative marking for wrong answers");
  514.     getch();
  515.   }
  516.  
  517. void about()
  518.     {system("cls");
  519.     printf("\n\n\t*********************About Developer*********************************");
  520.     printf("\n\n\t*****ZaMaN's c-AI is Made By ZaMaN4031********");
  521.     printf("\n\n\t*****www.zamansheikh.com********");
  522.     printf("\n\n\t*****Thanks********");
  523.     getch();
  524.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement