Computer Science, asked by sunny85, 1 year ago

Compare and contrast the characteristics and/or organisation of
the Write an interactive C program for Q1.

Answers

Answered by rahul1232
1
#include
#include
main()
{
char qs [ ][100]={
{"\n 1. In which state you stay at \n\t (1). Delhi (2). Out of Delhi"},
{ "\n 2. who is the CM of Delhi? \n\t (1). Sheela Dixit (2). Arvind kejriwal"},
{"\n 3. Grass is which colour? \n\t (1). Green (2). Black"},
{" \n 4. Duration of MCA is
\n\t (1). 5 Years (2). 3 Years"},
{"\n 5. IGNOU Head office is situated where Delhi"},
};
int ans [ ]={1,2,1,1,2};
int choice ;
int score=0,a=0,t;
for (a =0;a<5;a++)
{
clrscr ( );
puts(qs[a]==choice)
printf("\n Enter the Answer (1 or 2) t\t\n");
scanf ("%d", &choice);

if (ans[a]==choice)
score =score+1
if (a<4)
{
printf("\n press enter to select next question..... \n");
getch ( );
{
else
printf (\n The End \n");
}
printf("\n your total score is =%d", score);
getch ( );
}
Similar questions