cn anyone plsss tel me how to make a c program to check multiple choice questions (mcq's) with negative marking for wrong answer,,,,:banghead::bigcry:
Code: #include<stdio.h> main() { int c,m,s=0; printf"("where does the sun rise?\n"); //your sample question printf("choices: 1.east 2.west 3. north 4.south ; Enter choice(1-4)\n"); scanf("%d",&c); if(c==1) m=2; // marks for correct answer else m=-1; // negative marking printf"("where does the sun set?\n"); //your sample question printf("choices: 1.east 2.west 3. north 4.south ; Enter choice(1-4)\n"); scanf("%d",&c); if(c==2) m=2; // marks for correct answer else m=-1; // negative marking s+=m; // to store the final score of the user printf("Your score is : %d",s); } You can include any number of questions like this!!! Hope this was useful!!!