944,201 Members | Top Members by Rank

Ad:
  • C++ Code Snippet
  • Views: 4616
  • C++ RSS
0

Quiz Your self!!!

by on Sep 20th, 2004
Have a look at this programme. it is my semister project
C++ Code Snippet (Toggle Plain Text)
  1. #include<iostream.h>
  2. #include<conio.h>
  3. #include<iomanip.h>
  4. #include<stdio.h>
  5. #include<stdlib.h>
  6. #include<string.h>
  7. #include<dos.h>
  8. void recta(int r1,int r2,int c1,int c2)
  9. { gotoxy(r1,c1);
  10. cout<<(char)218;
  11. gotoxy(r2,c2);
  12. cout<<(char)217;
  13. gotoxy(r1,c2);
  14. cout<<(char)192;
  15. gotoxy(r2,c1);
  16. cout<<(char)191;
  17. for( int a=c1+1;a<c2;a++)
  18. {gotoxy(r1,a);
  19. cout<<(char)179;
  20. gotoxy(r2,a);cout<<(char)179;
  21. }
  22. for(a=r1+1;a<r2;a++)
  23. {gotoxy(a,c1);
  24. cout<<(char)196;
  25. gotoxy(a,c2);cout<<(char)196;
  26. } }
  27. void recta1(int r1,int c1)
  28. {int r2=r1+25;
  29. int c2=c1+2;
  30. gotoxy(r1,c1);
  31. cout<<(char)218;
  32. gotoxy(r2,c2);
  33. cout<<(char)217;
  34. gotoxy(r1,c2);
  35. cout<<(char)192;
  36. gotoxy(r2,c1);
  37. cout<<(char)191;
  38. for( int a=c1+1;a<c2;a++)
  39. {gotoxy(r1,a);
  40. cout<<(char)179;
  41. gotoxy(r2,a);cout<<(char)179;
  42. }
  43. for(a=r1+1;a<r2;a++)
  44. {gotoxy(a,c1);
  45. cout<<(char)196;
  46. gotoxy(a,c2);cout<<(char)196;
  47. } }
  48. int que(char q[40],char a[20],char b[20],char c[20],char d[20],int n,int li,int ci)
  49. {int mark=0;
  50. int x;
  51. cout<<"\n\n";
  52. textcolor(WHITE);
  53. cout<<(char)218;
  54. for(int i=0;i<71;i++)
  55. {
  56. cout<<(char)196;
  57. }
  58. cout<<(char)191;cout<<endl;
  59. cout<<(char)179;
  60. cout<<"QUESTION-"<<n;
  61.  
  62. for( i=0;i<54;i++)
  63. {
  64. cout<<" ";
  65. }
  66. cout<<"LEVEL-"<<ci;
  67. cout<<(char)179;
  68. cout<<endl;
  69. cout<<(char)192;
  70. for(i=0;i<71;i++)
  71. {
  72. cout<<(char)196;
  73. }
  74. cout<<(char)217;
  75. cout<<"\n\n"<<" ";
  76. cout<<q;
  77. cout<<"\n\n";
  78. textcolor(GREEN);
  79. cputs(" (1) ");
  80. textcolor(WHITE);
  81. cputs(a);cout<<endl;
  82. textcolor(GREEN);
  83. cputs(" (2) ");
  84. textcolor(WHITE);
  85. cputs(b);cout<<endl;
  86. textcolor(GREEN);
  87. cputs(" (3) ");
  88. textcolor(WHITE);
  89. cputs(c);cout<<endl;
  90. textcolor(GREEN);
  91. cputs(" (4) ");
  92. textcolor(WHITE);
  93. cputs(d);cout<<endl<<endl;
  94. cout<<"ans:";
  95. cin>>x;
  96. if(x==li)
  97. {mark+=1;
  98. cout<<endl;
  99. cputs("CORRECT");
  100. }
  101. else
  102. {cout<<endl;
  103. cputs("INCORRECT");
  104. }
  105. return mark;
  106. }
  107. int que1(char q[40],char a[20],char b[20],char c[20],char d[20],int n,int li,int ci)
  108. {int mark=0;
  109. int x;
  110. cout<<"\n\n";
  111. textcolor(WHITE);
  112. cout<<(char)218;
  113. for(int i=0;i<71;i++)
  114. {
  115. cout<<(char)196;
  116. }
  117. cout<<(char)191;cout<<endl;
  118. cout<<(char)179;
  119. cout<<"QUESTION-"<<n;
  120.  
  121. for( i=0;i<53;i++)
  122. {
  123. cout<<" ";
  124. }
  125. cout<<"LEVEL-"<<ci;
  126. cout<<(char)179;
  127. cout<<endl;
  128. cout<<(char)192;
  129. for(i=0;i<71;i++)
  130. {
  131. cout<<(char)196;
  132. }
  133. cout<<(char)217;
  134. cout<<"\n\n"<<" ";
  135. cout<<q;
  136. cout<<"\n\n";
  137. textcolor(GREEN);
  138. cputs(" (1) ");
  139. textcolor(WHITE);
  140. cputs(a);cout<<endl;
  141. textcolor(GREEN);
  142. cputs(" (2) ");
  143. textcolor(WHITE);
  144. cputs(b);cout<<endl;
  145. textcolor(GREEN);
  146. cputs(" (3) ");
  147. textcolor(WHITE);
  148. cputs(c);cout<<endl;
  149. textcolor(GREEN);
  150. cputs(" (4) ");
  151. textcolor(WHITE);
  152. cputs(d);cout<<endl<<endl;
  153. cout<<"ans:";
  154. cin>>x;
  155. if(x==li)
  156. {mark+=1;
  157. cout<<endl;
  158. cputs("CORRECT");
  159. }
  160. else
  161. {cout<<endl;
  162. cputs("INCORRECT");
  163. }
  164. return mark;
  165. }
  166. void disp1(char a[100],int x,int y)
  167. {
  168. int f=strlen(a);
  169. gotoxy(x,y);
  170. for(int i=0;i<f;i++)
  171. {delay(10);
  172. cout<<a[i];
  173. }
  174. }
  175.  
  176.  
  177. int level1()
  178. {int m=0;
  179. textbackground(BLUE);
  180. textcolor(WHITE);
  181. clrscr();
  182. m+=que("Who proposed the theory of mutation?","Mendeleev","Pascal","Louis Pasteur","Mendel",1,4,1);
  183. m+=que("Who invented the first antibiotic","Hooks","Alexander Fleming","Shildon","Rudolph Virchow",2,2,1);
  184. m+=que("Which is the longest strait?","Malaka Strait","Palk Strait","Gibraltar","Suez strait",3,1,1);
  185. m+=que("Which is the largest lake in the world","Titikaka","Chilka","Baikal","Caspian sea",4,4,1);
  186. m+=que("Where do tribals called Zulus reside?","Nigeria","South Africa","Venezuela","Egypt",5,2,1);
  187. m+=que("Who led the great bolshevik revolution?","Stalin","Karl Marx","The Czar","Lenin",6,4,1);
  188. m+=que("When was the Bohr War fought?","1970","1880","1899","1400",7,3,1);
  189. m+=que("Who is known as the father of Radioactive physics?","E Fermi","H Becquerel","Heisenberg","Rutherford",8,2,1);
  190. m+=que("On whose theory is the modern periodic table based?","Moseley","Mendeleev","Heisenberg","Rutherford",9,1,1);
  191. m+=que1("Who invented vulcanized rubber?","Dunlop","J Vulcan","C Goodyear","Diamler",10,3,1);
  192. return m;
  193. }
  194. int level2()
  195. {int m=0;
  196. textbackground(BLUE);
  197. textcolor(WHITE);
  198. clrscr();
  199. m+=que("Who proposed the theory of relativity?","Newton","Pascal","Louis Pasteur","Einstien",1,4,2);
  200. m+=que("How many bones are there in the human body?","120","206","403","221",2,2,2);
  201. m+=que("Which battle marked the downfall of Napoleon?","Battle of Waterloo","World war 1","Bohr War","American Civil War",3,1,2);
  202. m+=que("Which city is known as the city of joy?","Calcutta","Chicago","Berlin","Paris",4,1,2);
  203. m+=que("What is the new name of South Rhodesia","Nigeria","Zimbabwe","Venezuela","Egypt",5,2,2);
  204. m+=que("Which is the national game of USA?","Football","Baseball","Basketball","Hockey",6,2,2);
  205. m+=que("Sunny days is the autobiography of?","Ian Botham","Viv Richards","Kapil Dev","Sunil Gavaskar",7,4,2);
  206. m+=que("Who is the author of Mein Kempf?","Adolf Hitler","Winston Churchill","Roosevelt","M L King",8,1,2);
  207. m+=que("Where is the famous Bermuda Triangle located?","Black Sea","Mediterranaen Sea","Caspian Sea","Atlantic Ocean",9,4,2);
  208. m+=que1("Who is the father of white revolution in India ?","M L Singh","V Kurien ","C V Raman","H J Bhabha",10,2,2);
  209. return m;
  210. }
  211.  
  212. int level3()
  213. {int m=0;
  214. textbackground(BLUE);
  215. textcolor(WHITE);
  216. clrscr();
  217. m+=que("Who was the first thirthankar of jainism?","Mahavira","Uddalaka","Rishabhadeva","aghnideva",1,1,3);
  218. m+=que("how many nuclear tests has US conducted?","<100","<500",">1000",">4000",2,3,3);
  219. m+=que("What is the currency of Bangladesh?","rupee","ruphiah","taka","peseta",3,3,3);
  220. m+=que("When was People's Republic of China established","1934","1949","1989","1900",4,2,3);
  221. m+=que("Who introduced the terms glasnost and pretroiko ","George Bush","Gorbache","Yeltsin","Stalin",5,2,3);
  222. m+=que("Who invented the polio vaccine","J E Salk","Pasteur","E Jenner","Pascal",6,1,3);
  223. m+=que("As bad as i wanna be is the autobiography of?","Ian Botham","Micheal Jordan","Dennis Rodman","Maradona",7,3,3);
  224. m+=que("Who is the author of 'the god of small things'?","Sydney Sheldon","Arundhati Roy","Ken Follett","R L Stine",8,1,3);
  225. m+=que("Where is the famous Barrier Reef located?","England","India","USA","Australia",9,4,3);
  226. m+=que1("?Name the grasslands of Europe","Steppes","Downs ","Praires","Pampas",10,1,3);
  227. return m;
  228. }
  229. void disp(char a[100],int x,int y)
  230. {clrscr();
  231. gotoxy(x,y);
  232. int e=strlen(a);
  233. for(int i=0;i<e;i++)
  234. {
  235. delay(125);
  236. cout<<a[i];
  237. }
  238. }
  239. void start()
  240. {
  241. textmode(C40);
  242. textcolor(WHITE);
  243. textbackground(BLUE);
  244. delay(2000);
  245. disp("SAS PROGRAMMERS GROUP PRESENTS",6,12);
  246. delay(1000);
  247. char head[20]="BRAINRACKER";
  248. disp(head,15,12);
  249. delay(1000);
  250. disp("THE ULTIMATE QUIZ CHALLENGE",8,12);
  251. delay(1500);
  252. }
  253. int start1()
  254. {
  255. textmode(C80);
  256. textbackground(BLUE);
  257. textcolor(YELLOW);
  258. clrscr();
  259. recta(20,60,6,21);
  260. delay(1000);
  261. gotoxy(31,8);
  262. cputs("BRAINRACKER-MAIN MENU");
  263. delay(250);
  264. textcolor(CYAN);
  265. gotoxy(31,10);
  266. cputs("1.START QUIZ");
  267. delay(250);
  268. gotoxy(31,12);
  269. cputs("2.ABOUT THIS PR0GRAM");
  270. delay(250);
  271. gotoxy(31,14);
  272. cputs("3.CREDITS");
  273. delay(250);
  274. gotoxy(31,16);
  275. cputs("4.INSTRUCTIONS");
  276. delay(200);
  277. gotoxy(31,18);
  278. cputs("5.EXIT");
  279. gotoxy(31,23);
  280. cputs("ENTER YOUR CHOICE:");
  281. int y;
  282. cin>>y;
  283. return y;
  284. }
  285. void sorry()
  286. {textmode(C40);
  287. textcolor(RED);
  288. clrscr();
  289. delay(1500);
  290. disp1("YOU COULD NOT ADVANCE TO THE NEXT LEVEL",1,12);
  291. delay(3000);
  292. }
  293.  
  294. int level4()
  295. {int m=0;
  296. textbackground(BLUE);
  297. textcolor(WHITE);
  298. clrscr();
  299. m+=que("When did USA become independent?","1788","1776","1789","1800",1,2,4);
  300. m+=que("Which is the highest waterfall in the world?","Niagara Falls","Angel Falls","Fischer falls","St.Louis falls",2,2,4);
  301. m+=que("What is the currency of Italy?","Italian Dollar","Denarii","Lira","Rouble",3,3,4);
  302. m+=que("Where were the first Asian Games held?","Bangkok","New Delhi","Beijing","Singapore",4,2,4);
  303. m+=que("When were the first Modern Olympics held?","1896","1806","1490","1895",5,1,4);
  304. m+=que("Which of the following scientists was a Jew?","Heisenberg","Rutherford","Madam Curie","Einstien",6,4,4);
  305. m+=que("Which is the largest temple of the world","Konark temple","Omkar temple","Ankor Watt","Sun temple",7,3,4);
  306. m+=que("Which of the following is known as the city oflakes?","Geneva","Bangkok","Venice","Paris",8,3,4);
  307. m+=que("Which country has more than 55000 lakes?","USA","Finland","Sweden","France",9,2,4);
  308. m+=que1("Which philosopher drank the cup of hemlock","Socrates","Plato","Kurt Godel","Karl Marx",10,1,4);
  309. return m;
  310. }
  311. int sport1()
  312. {int m=0;
  313. m+=que("Who is the hoghest run getter in ONI's ?","Allan Border","Desmond Haynes","Brain Lara","Mohd.Ahzaruddin",1,4,5);
  314. m+=que("Who won the ladies Wimbledon Tennis Title 9 times ?","Martina Navratilova","Chris Evert","Steffi Graf","Martina Hingis",2,1,5);
  315. m+=que("Who has the maximum no of career pts in the NBA ?","Micheal Jordan","Dennis Rodman","Abdul Jabbar","Karl Malone",3,3,5);
  316. m+=que("Which boxer was infamous for repeatedly saying'Iam the greatest'?","Mike Tyson","Mohd.Ali","E Holyfield","Lyon King",4,2,5);
  317. m+=que("When did India win the cricket World Cup?","1993","1983","1979","1975",5,1,5);
  318. m+=que("Who has the highest international test batting average till date ?","Micheal Bevan","Allan Border","D Bradman","Desmond Haynes",6,3,5);
  319. m+=que("Which is the largest temple of the world","Konark temple","Omkar temple","Ankor Watt","Sun temple",7,4,5);
  320. m+=que("Which of the following is known as the city oflakes?","Geneva","Bangkok","Venice","Paris",8,3,5);
  321. m+=que("Which country has more than 55000 lakes?","USA","Finland","Sweden","France",9,2,5);
  322. m+=que1("Which philosopher drank the cup of hemlock","Socrates","Plato","Kurt Godel","Karl Marx",10,1,5);
  323. return m;
  324. }
  325. int level5()
  326. {
  327. textbackground(BLUE);
  328. textcolor(WHITE);
  329. clrscr();
  330. int m=0;
  331. m+=que("Which canal connects the North Sea and the Baltic Sea?","Suez Canal","Keil Canal","Thompson Canal","St. Edward Canal",1,2,5);
  332. m+=que("Who first used acupuncture?","Romans","Indians","Chinese","Japanese",2,3,5);
  333. m+=que("When was the television invented?","1892","1941","1966","1926",3,4,5);
  334. m+=que("Which city is known as the Pink City?","Calcutta","Chicago","Jaipur","Moswcow",4,3,5);
  335. m+=que("What is the new name of Belgian Congo","Nigeria","Zaire","Malaysia","Madagascar",5,2,5);
  336. m+=que("How many cells are there in a newborn baby?","90 Billion","3 Million","26 Billion","76 Million",6,3,5);
  337. m+=que("Which is the only car in the UK without a numberplate?","PM's Car","Vice Chancellor's car","King's Car","Queen's Car",7,4,5);
  338. m+=que("What is the age of the Sun?","5 Billion Years","10 Billion Years","3 Billion Years","16 Billion Years",8,1,5);
  339. m+=que("How many moons does Jupiter have?","10","32","5","17",9,4,5);
  340. m+=que1("Which of the following Rivers flow into the Black Sea?","Thames","Rhine ","Danube","Volga",10,3,5);
  341. return m;
  342. }
  343.  
  344. void fscore(int r,int r1,int r2,int r3,int r4,int tot)
  345. {textmode(C80);
  346. textcolor(RED);
  347. textbackground(BLACK);
  348. clrscr();
  349.  
  350. disp1("SCORE SUMMARY",35,3);
  351.  
  352. recta(25,55,5,17);
  353. recta(40,55,5,17);
  354. recta(22,60,19,23);
  355. disp1("REMARKS",36,18);
  356. gotoxy(30,6);
  357. cout<<"LEVEL";
  358. gotoxy(45,6);
  359. cout<<"SCORE";
  360. textbackground(BLACK);
  361. textcolor(GREEN);
  362.  
  363. if((r>5)&&(r1>5)&&(r2>5)&&(r3>5))
  364. {disp1("level 1:",28,8);
  365. gotoxy(48,8);
  366. cout<<r;
  367. disp1("level 2:",28,10);
  368. gotoxy(48,10);
  369. cout<<r1;
  370. disp1("Level 3:",28,12);
  371. gotoxy(48,12);
  372. cout<<r2;
  373. disp1("level 4:",28,14);
  374. gotoxy(48,14);
  375. cout<<r3;
  376. disp1("Level 5:",28,16);
  377. gotoxy(48,16);
  378. cout<<r4;
  379. disp1("performance:excellent",26,22);
  380. disp1("you reached the final level",26,20);
  381. }
  382. else if((r>5)&&(r1>5)&&(r2>5))
  383. {disp1("level 1:",28,8);
  384. gotoxy(48,8);
  385. cout<<r;
  386. disp1("level 2:",28,10);
  387. gotoxy(48,10);
  388. cout<<r1;
  389. disp1("level 3:",28,12);
  390. gotoxy(48,12);
  391. cout<<r2;
  392. disp1("level 4:",28,14);
  393. gotoxy(48,14);
  394. cout<<r3;
  395. disp1("performance:very good",26,22);
  396. disp1("you reached level 4",26,20);
  397. }
  398. else if((r>5)&&(r1>5))
  399. { disp1("level 1:",28,8);
  400. gotoxy(48,8);
  401. cout<<r;
  402. disp1("level 2:",28,10);
  403. gotoxy(48,10);
  404. cout<<r1;
  405. disp1("level 3:",28,12);
  406. gotoxy(48,12);
  407. cout<<r2;
  408. disp1("performance:good",26,22);
  409. disp1("you reached level 3",26,20);
  410. }
  411. else if(r>5)
  412. { disp1("level 1:",28,8);
  413. gotoxy(48,8);
  414. cout<<r;
  415. disp1("level 2:",28,10);
  416. gotoxy(48,10);
  417. cout<<r1;
  418. disp1("performance:above average",26,22);
  419. disp1("you reached level 2",26,20);
  420. }
  421. else
  422. {disp1("level 1:",28,8);
  423. gotoxy(48,8);
  424. cout<<r;
  425. disp1("performance:average",26,22);
  426. disp1("you did not advance beyond level 1",26,20);
  427. }
  428. cout<<endl;
  429. disp1("total score:",26,21);
  430. cout<<tot;
  431. disp1(">>press any key to return to menu...........",25,25);
  432. getch();
  433. }
  434. void pscore(int r)
  435. { if(r==10)
  436. {textmode(C40);
  437. textcolor(BLUE);
  438. delay(1000);
  439. disp("PERFECT SCORE",14,12);
  440. delay(3000);
  441. }
  442. }
  443. void stat(int r,int p)
  444. {
  445. textmode(C80);
  446. textbackground(BLACK);
  447. textcolor(GREEN);
  448. clrscr();
  449. recta(25,55,7,13);
  450. disp1("LEVEL STATISTICS",32,3);
  451. disp1("YOUR LEVEL SCORE:",30,9);
  452. cout<<r;
  453. disp1("PERCENTAGE",30,11);
  454. cout<<" "<<p<<"%";
  455. disp1(">>press any key to proceed.........",25,16);
  456. getch();
  457. }
  458. void submain()
  459. {clrscr();
  460. int x=start1();
  461. char w[60]="Brainracker is an interactive multilevel Quiz programme";
  462. char t[60]="which tests your knowledge in all spheres.It contists of";
  463. char g[60]="more than 50 questions in different categories or topics.";
  464. char l[60]="It includes a multilevel general quiz for an overall ";
  465. char m[60]="test of your knowledge.This has five levels of increasing";
  466. char n[60]="difficulty.The player has to answer at least 5 questions ";
  467. char j[60]="out of ten to advance to the next level.";
  468. char t1[70]="In order to play the Quiz select start quiz from the ";
  469. char e[60]="main menu and answer each multiple choice question by ";
  470. char v[60]="typing the no of your answer.The program examines whether ";
  471. char i[60]="you have answered correctly and shows the relevant message.";
  472. char d[60]="This continues and succesive levels appear till you ";
  473. char x1[60]="complete all levels or fail to score at least 5 in one ";
  474. char q[60]="level.After this score for each level is displayed.";
  475. switch(x)
  476. {
  477. case 1: { recta1(27,9);
  478. delay(2500);
  479. clrscr();int r=0,r1=0,r2=0,r3=0,r4=0;
  480. textmode(C40);
  481. textbackground(BLACK);
  482. textcolor(GREEN);
  483. delay(2000);
  484. disp("LEVEL 1",18,12);
  485. delay(2500);
  486. textmode(C80);
  487. textcolor(WHITE);
  488. r=level1();
  489. int p=(r*10);
  490. int tot=0;
  491. tot+=r;
  492. pscore(r);
  493. delay(500);
  494. stat(r,p);
  495. if (r>5)
  496. {
  497. textmode(C40);
  498. textbackground(BLACK);
  499. textcolor(GREEN);
  500. clrscr();
  501. delay(2000);
  502. disp1("YOU HAVE ADVANCED TO LEVEL 2",7,10);
  503. delay(2000);
  504. clrscr();
  505. disp("LEVEL 2",18,12);
  506. delay(2500);
  507. textmode(C80);
  508. textcolor(WHITE);
  509. clrscr();
  510. r1=level2();
  511. int p1=(r1*10);
  512. clrscr();
  513. pscore(r1);
  514. delay(500);
  515. stat(r1,p1);
  516. tot+=r1;
  517. }
  518.  
  519. if(r1>5)
  520. {
  521. clrscr();
  522. textmode(C40);
  523. textcolor(GREEN);
  524. textbackground(BLACK);
  525. clrscr();
  526. delay(2000);
  527. disp1("YOU HAVE ADVANCED TO LEVEL 3",7,10);
  528. delay(2500);
  529. clrscr();
  530. disp("LEVEL 3",18,12);
  531. delay(2500);
  532. textmode(C80);
  533. textcolor(WHITE);
  534. clrscr();
  535. r2=level3();
  536. int p2=(r2*10);
  537. pscore(r2);
  538. delay(500);
  539. stat(r2,p2);
  540. tot+=r2;
  541. }
  542.  
  543. if(r2>5)
  544. {
  545. textmode(C40);
  546. textcolor(GREEN);
  547. textbackground(BLACK);
  548. clrscr();
  549. delay(2500);
  550. disp1("YOU HAVE ADVANCED TO LEVEL 4",7,10);
  551. delay(2500);
  552. clrscr();
  553. disp("LEVEL 4",18,12);
  554. delay(2500);
  555. textmode(C80);
  556. textcolor(WHITE);
  557. clrscr();
  558. r3=level4();
  559. pscore(r3);
  560. int p3=(r3*10);
  561. tot+=r3;
  562. delay(500);
  563. stat(r3,p3);
  564. }
  565.  
  566. if(r3>5)
  567. {
  568. textmode(C40);
  569. textcolor(GREEN);
  570. textbackground(BLACK);
  571. clrscr();
  572. delay(2000);
  573. disp1("YOU HAVE ADVANCED TO LEVEL 5",7,10);
  574. delay(2500);
  575. disp("LEVEL 5",18,12);
  576. delay(2500);
  577. textmode(C80);
  578. clrscr();
  579. r4=level5();
  580. pscore(r4);
  581. int p4=(r4*10);
  582. tot+=r4;
  583. delay(500);
  584. stat(r4,p4);
  585. }
  586.  
  587. fscore(r,r1,r2,r3,r4,tot);
  588. submain();
  589. }break;
  590. case 2: {recta1(27,11);
  591. textcolor(RED);
  592. delay(2000);
  593. textmode(C80);
  594. textcolor(GREEN);
  595. clrscr();
  596. delay(2000);
  597. recta(10,71,4,15);
  598. disp1("ABOUT THIS PROGRAM",32,3);
  599. delay(300);
  600. disp1(w,12,6);
  601. delay(100);
  602. disp1(t,12,7);
  603. delay(100);
  604. disp1(g,12,8);
  605. delay(100);
  606. disp1(l,12,9);
  607. delay(100);
  608. disp1(m,12,10);
  609. delay(100);
  610. disp1(n,12,11);
  611. delay(100);
  612. disp1(j,12,12);
  613. disp1(">>press any key to return to menu.........",15,20);
  614. getch();
  615. submain();
  616. }break;
  617. case 3:{recta1(27,13);
  618. textmode(C80);
  619. textcolor(GREEN);
  620. delay(1500);
  621. clrscr();
  622. disp1("CREDITS",35,3);
  623. disp1("This program has been made by SHOUVIK.",12,6);
  624. disp1(">>press any key to return to menu.........",15,20);
  625. getch();
  626. submain();
  627. }break;
  628. case 4:{ recta1(27,15);
  629. textmode(C80);
  630. textcolor(GREEN);
  631. clrscr();
  632. recta(10,72,4,15);
  633. disp1("INSTRUCTIONS",35,2);
  634. disp1(t1,13,6);
  635. disp1(e,13,7);
  636. disp1(v,13,8);
  637. disp1(i,13,9);
  638. disp1(d,13,10);
  639. disp1(x1,13,11);
  640. disp1(q,13,12);
  641. disp1(">>press any key to return to menu.........",15,20);
  642. getch();
  643. submain();
  644. }
  645. case 5:{recta1(27,17);
  646. delay(1500);
  647. textbackground(BLACK);
  648. textcolor(GREEN);
  649. clrscr();
  650. disp1(">>quitting brainracker..........",2,2);
  651.  
  652. delay(700);
  653. disp1(">>press enter..........",2,3);
  654.  
  655. }
  656. break;
  657. default:{textbackground(BLACK);
  658. textcolor(GREEN);
  659. clrscr();
  660. disp1(">>invalid choice entered...",1,1); delay(700);
  661. disp1(">>returning to menu....",1,2);delay(1500);
  662. submain();
  663. }
  664. }
  665.  
  666. getch();
  667. }
  668. void main()
  669. {start();
  670. submain();
  671. }
  672.  
Comments on this Code Snippet
Sep 20th, 2004
0

Re: Quiz Your self!!!

When i compiled it i got 68 errors.
Nearly a Posting Virtuoso
mikeandike22 is offline Offline
1,496 posts
since May 2004
Sep 20th, 2004
0

Re: Quiz Your self!!!

Well I suppose u try correccting them then. they are working fine oon my compiler...
Newbie Poster
shouvik is offline Offline
16 posts
since Aug 2004
Sep 30th, 2004
0

Re: Quiz Your self!!!

yes
Unverified User
thakur ravi is offline Offline
1 posts
since Sep 2004
Message:
Previous Thread in C++ Forum Timeline: Easy one (I think)!
Next Thread in C++ Forum Timeline: How to read in a sentence and insert in to linked list?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC