-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gk+_quiz.c
131 lines (128 loc) · 2.91 KB
/
Gk+_quiz.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
char name[20];
char mobno[10];
int m;
char in[10];
int indiaopt();
void login(){
char name[20];
char mobno[10];
printf("\nEnter Youur Name : ");
gets(name);
printf("\nEnter Your Mobile No. : ");
gets(mobno);
}
void signup(){
char name[20];
char mobno[10];
char dob[10];
char email[50];
printf("\nEnter Youur Name : ");
gets(name);
printf("\nEnter Your Mobile No. : ");
gets(mobno);
printf("\nEnter Your Date of Birth : ");
gets(dob);
printf("Enter Your Email : ");
gets(email);
}
int topic(){
int no;
printf("\n%c1.%c States and their Capitals.",91,93);
printf("\n%c2.%c Couunteris and their Capitals.",91,93);
printf("\n%c3.%c National things.",91,93);
printf("\n%c4.%c National Rivers ",91,93);
printf("\n Choose Option: ");
scanf("%d",&no);
return no;
}
int state(){
int g,i;
printf("\n\t\t%c%d.%c States and their Capitals.",91,m,93);
printf("\n\t\t");
for(i=0;i<=31;i++)
{
printf("%c",196);
}
printf("\n %c1.%c INDIA ",91,93);
/* printf("\n\n%cA%c AMERICA \t %cB%c BHUTAN\n%cC%c CHINA\t %cD%c NEW DELHI",91,93,91,93,91,93,91,93);
scanf("%c",&in);*/
indiaopt();
printf("\n\f %c2.%c AFGANISTAN ",91,93);
// afga();
return in[10];
}
int indiaopt(){
printf("\n\n%cA%c AMERICA \t %cB%c BHUTAN\n%cC%c CHINA\t %cD%c NEW DELHI",91,93,91,93,91,93,91,93);
scanf("%c",&in[0]);
system("cls");
printf("\n\n%cA%cKABUL\t %cB%c BHUTAN\n%cC%c DAKA\t %cD%c THIMPU",91,93,91,93,91,93,91,93);
scanf("%c",&in[1]);
}
/*int afga(){
printf("\n\n%cA%cKABUL\t %cB%c BHUTAN\n%cC%c DAKA\t %cD%c THIMPU",91,93,91,93,91,93,91,93);
scanf("%c",&in[1]);
}*/
int main()
{
int i, los;
char ind;
//char mobno[10];
//char name[20];
printf("\t*** WELCOME TO GK TEST ***\n");
printf("\t");
for(i=0;i<=34;i++)
{
printf("%c",196);
}
/*printf("\n\tRegister Your Self,");
printf("\nEnter Youur Name : ");
gets(name);
printf("Your Name : %s",name);
printf("\nEnter Your Mobile No. : ");
gets(mobno);
scanf("%d",&mobno);
printf("Your Mob No. : %s",mobno);
system(cls);
*/
printf("\n \a1.%cLOGIN \t 2.%cSIGNUP \n",175,175);
scanf("%d",&los);
switch(los){
case 1:
login();
break;
case 2:
signup();
break;
default :
printf("\a INVILID CHHOICE !");
}
//system("cls");
m=topic();
switch(m)
{
case 1:
printf(" You choose %c%d.%c States and their Capitals.",91,m,93);
system("cls");
ind=state();
break;
case 2:
printf(" You choose %c%d.%c Couunteris and their Capitals.",91,m,93);
break;
case 3:
printf(" You choose %c%d.%c National things.",91,m,93);
break;
case 4:
printf(" You choose %c%d.%c google.",91,m,93);
break;
default:
printf("\a\a INVILID CHOICE ! ");
}
//system("cls");
// ind=state();
return 0;
getch();
}