Jothi's Neengalum Vellalaam Oru Kodi Using C

#include<stdio.h>

#include<conio.h>

void question1();

void main()

{

clrscr();

 printf("\n\n\t\t Welcome to Neengalum Vellalaam Oru Kodi");

 printf("\n\n\t\t*__*__*__*__*__*__*__*__*__*__*__*__*__*");

getch();

question1();

getch();

}

char a,A,b,B,c,C,d,D,ans;

void question2();

void question1()

{

clrscr();

printf("\n\b Q1.Who is callewd the father of History????\n");

printf("\n\t A.Herodotus\tB.Hero");

printf("\n\t C.Jothi    \tD.Vinoth\n");

printf("The Answer may be",ans);

scanf("%c",&ans);

switch(ans)

{

case'b':

case'B':

case'c':

case'C':

case'd':

case'D':

printf("\n\n Wrong Answer");

break;

case'a':

case'A':

printf("\n\nYou Won RS.1000");

break;

default:

printf("\n\nImproper Answer!!!Sorry,You Lose The Game");

}

if((ans=='a')||(ans=='A'))

{

getch();

clrscr();

question2();

}

}

void question3();

void question2()

{

clrscr();

printf("\n\b Q1.Who is called the father of History????\n");

printf("\n\t A.Herodotus\tB.Hero");

printf("\n\t C.Jothi    \tD.Vinoth\n");

scanf("%c",&ans);

switch(ans)

{

case'b':

case'B':

case'c':

case'C':

case'd':

case'D':

printf("\n\n Wrong Answer");

break;

case'a':

case'A':

printf("\n\nYou Won RS.2000");

break;

default:

printf("\n\nImproper Answer!!!Sorry,You Lose The Game");

}

if((ans=='a')||(ans=='A'))

{

getch();

clrscr();

question3();

}

}

void question4();

void question3()

{

clrscr();

printf("\n\b Q1.Who is callewd the father of History????\n");

printf("\n\t A.Herodotus\tB.Hero");

printf("\n\t C.Jothi    \tD.Vinoth\n");

scanf("%c",&ans);

switch(ans)

{

case'b':

case'B':

case'c':

case'C':

case'd':

case'D':

printf("\n\n Wrong Answer");

break;

case'a':

case'A':

printf("\n\nYou Won RS.5000");

break;

default:

printf("\n\nImproper Answer!!!Sorry,You Lose The Game");

}

if((ans=='a')||(ans=='A'))

{

getch();

clrscr();

question3();

}

}

void question5();

void question4()

{

clrscr();

printf("\n\b Q1.Who is callewd the father of History????\n");

printf("\n\t A.Herodotus\tB.Hero");

printf("\n\t C.Jothi    \tD.Vinoth\n");

scanf("%c",&ans);

switch(ans)

{

case'b':

case'B':

case'c':

case'C':

case'd':

case'D':

printf("\n\n Wrong Answer");

break;

case'a':

case'A':

printf("\n\nYou Won RS.10000");

break;

default:

printf("\n\nImproper Answer!!!Sorry,You Lose The Game");

}

if((ans=='a')||(ans=='A'))

{

getch();

clrscr();

question4();

}

}

void question6();

void question5()

{

clrscr();

printf("\n\b Q1.Who is callewd the father of History????\n");

printf("\n\t A.Herodotus\tB.Hero");

printf("\n\t C.Jothi    \tD.Vinoth\n");

scanf("%c",&ans);

switch(ans)

{

case'b':

case'B':

case'c':

case'C':

case'd':

case'D':

printf("\n\n Wrong Answer");

break;

case'a':

case'A':

printf("\n\nYou Won RS.50000");

break;

default:

printf("\n\nImproper Answer!!!Sorry,You Lose The Game");

}

if((ans=='a')||(ans=='A'))

{

getch();

clrscr();

question5();

}

}

void question7();

void question6()

{

clrscr();

printf("\n\b Q1.Who is callewd the father of History????\n");

printf("\n\t A.Herodotus\tB.Hero");

printf("\n\t C.Jothi    \tD.Vinoth\n");

scanf("%c",&ans);

switch(ans)

{

case'b':

case'B':

case'c':

case'C':

case'd':

case'D':

printf("\n\n Wrong Answer");

break;

case'a':

case'A':

printf("\n\nYou Won RS.100000");

break;

default:

printf("\n\nImproper Answer!!!Sorry,You Lose The Game");

}

if((ans=='a')||(ans=='A'))

{

getch();

clrscr();

question6();

}

}

void question8();

void question7()

{

clrscr();

printf("\n\b Q1.Who is callewd the father of History????\n");

printf("\n\t A.Herodotus\tB.Hero");

printf("\n\t C.Jothi    \tD.Vinoth\n");

scanf("%c",&ans);

switch(ans)

{

case'b':

case'B':

case'c':

case'C':

case'd':

case'D':

printf("\n\n Wrong Answer");

break;

case'a':

case'A':

printf("\n\nYou Won RS.250000");

break;

default:

printf("\n\nImproper Answer!!!Sorry,You Lose The Game");

}

if((ans=='a')||(ans=='A'))

{

getch();

clrscr();

question7();

}

}

void question9();

void question8()

{

clrscr();

printf("\n\b Q1.Who is callewd the father of History????\n");

printf("\n\t A.Herodotus\tB.Hero");

printf("\n\t C.Jothi    \tD.Vinoth\n");

scanf("%c",&ans);

switch(ans)

{

case'b':

case'B':

case'c':

case'C':

case'd':

case'D':

printf("\n\n Wrong Answer");

break;

case'a':

case'A':

printf("\n\nYou Won RS.500000");

break;

default:

printf("\n\nImproper Answer!!!Sorry,You Lose The Game");

}

if((ans=='a')||(ans=='A'))

{

getch();

clrscr();

question8();

}

}

void question10();

void question9()

{

clrscr();

printf("\n\b Q1.Who is callewd the father of History????\n");

printf("\n\t A.Herodotus\tB.Hero");

printf("\n\t C.Jothi    \tD.Vinoth\n");

scanf("%c",&ans);

switch(ans)

{

case'b':

case'B':

case'c':

case'C':

case'd':

case'D':

printf("\n\n Wrong Answer");

break;

case'a':

case'A':

printf("\n\nYou Won RS.750000");

break;

default:

printf("\n\nImproper Answer!!!Sorry,You Lose The Game");

}

if((ans=='a')||(ans=='A'))

{

getch();

clrscr();

question9();

}

}

void question11();

void question10()

{

clrscr();

printf("\n\b Q1.Who is callewd the father of History????\n");

printf("\n\t A.Herodotus\tB.Hero");

printf("\n\t C.Jothi    \tD.Vinoth\n");

scanf("%c",&ans);

switch(ans)

{

case'b':

case'B':

case'c':

case'C':

case'd':

case'D':

printf("\n\n Wrong Answer");

break;

case'a':

case'A':

printf("\n\nYou Won RS.10000000");

print("\n\n YOU ARE THE NVOK CHAMPION!!!")

break;

default:

printf("\n\nImproper Answer!!!Sorry,You Lose The Game");

}

if((ans=='a')||(ans=='A'))

{

getch();

clrscr();

question10();

}

}

gotoxy(30,8);

printf("Congrats,U won!!");

}

}

for time being i made all Questions and options to be the same and the Ans is Herodotus&by soon i'll be back with C++ implementation....

Kindly.,

Jothi

No comments:

Post a Comment