tis part of my assignment.Code:printf ("1.Enter the number of questions to be asked for this round of the quiz\n\n"); //Number of quizs printf ("2.Start quiz\n\n"); //Run questions printf ("3.Display the number of questions answered (i) correct and (ii) incorrect\n\n"); //Display results printf ("4.Exit Program\n\n"); //Exit Program printf ("Enter option : \n\n"); scanf ("%d", &Selection); if (Selection == 1) { printf ("How many Question would you like to be asked? [ 1 - 4 ]\n"); scanf ("%d\n", &SelectionQuestions); } else if (Selection == 2) { printf (" --------------------------\n"); printf (" -[-[ Question Begin ]-]- \n"); printf (" --------------------------\n\n"); printf ("----------------\n"); printf ("- 1st Question -\n"); printf ("----------------\n"); printf ("What is 1 + 1 = ?\n"); scanf ("%d", &answer); if (answer ==2) printf("\nYou got it right!!!\n\n\n"); else printf("\nThe answer is incorrect , the correct answer is 2\n\n\n"); printf ("----------------\n"); printf ("- 2nd Question -\n"); printf ("----------------\n"); printf("What is 10 - 5 = ?\n"); scanf("%d",&answer); if (answer ==5) printf("\nYou got it right!!!\n\n\n"); else printf("\nThe answer is incorrect , the correct answer is 5\n\n\n"); printf ("----------------\n"); printf ("- 3rd Question -\n"); printf ("----------------\n"); printf("What is 3+4-10= ?\n"); scanf("%d",&answer); if ( answer ==-3) printf("\nYou got it right!!!\n\n\n"); else printf("\nIncorrect! The correct answer is -3\n\n\n"); printf ("----------------\n"); printf ("- 4th Question -\n"); printf ("----------------\n"); printf("What is 10+20+4-10 = ?\n"); scanf("%d",&answer); if ( answer ==24) printf("\nYou got it right!!!\n\n\n"); else printf("\nIncorrect! The correct answer is 24\n\n\n"); } system("PAUSE"); return 0; }
i cant figure the part where i select how many question to be asked that part.
can any1 just tutor me or show me any tutorial which is similar to it?