This is fine until I insert printf("This question has been selected."); after if (attempt>0). Once I insert this line, I get an error stating 'else without a previous if'.Code:#include <stdio.h> #include <string.h> int main () { int x; int attempt=0; char a; char b[7]; char c[]="TRUE"; char d[15]; char e[]="Establishment"; do { printf("WELCOME TO THE AMERICAN HISTORY INTERACTIVE QUIZ PROGRAM!!!\n"); printf("THIS SERIES IS ON THE U.S. CONSTITUTION.\n"); printf("THERE ARE 20 QUESTIONS IN TOTAL.\n"); printf("PLEASE ENTER A NUMBER IN THE RANGE 1-20,INCLUSIVE:\n"); printf("ENTER A NUMBER OUTSIDE THIS RANGE TO QUIT THIS PROGRAM.\n"); scanf("%d",&x); switch (x) { case 1: if (attempt>0) break; else printf("What is the significance of Madison vs. Marbury?\n"); printf("a. The U.S. Supreme Court asserted its right to judicial review and transformed the power relationships between the executive, legislative, and the judicial branches.\n"); printf("b. The Judiciary Act of 1789 was found to be partially unconstitutional.\n"); printf("c. Marbury did not receive his political appointment in time.\n"); printf("d. Marbury never became a Justice of the Peace in the District of Columbia.\n"); scanf(" %c", &a); if (a=='a') printf("CORRECT!\n"); else printf("INCORRECT!\n"); ++attempt; break; case 2: printf("Which U.S. Constitutional amendment was ratified to ensure American women's voting rights?\n"); printf("a. 17th\n"); printf("b. 18th\n"); printf("c. 19th\n"); printf("d. 22nd\n"); scanf(" %c", &a); if (a=='c') printf("CORRECT!\n"); else printf("INCORRECT!\n"); break; case 3: printf("Which U.S. Constitutional amendment was ratified to mandate the direct election of U.S. Senators?\n"); printf("a. 16th\n"); printf("b. 17th\n"); printf("c. 18th\n"); printf("d. 19th\n"); scanf(" %c", &a); if (a=='b') printf("CORRECT!\n"); else printf("INCORRECT!\n"); break; case 4: printf("Which U.S. Constitutional amendment was ratified to ensure American women's voting rights?\n"); printf("a. 17th\n"); printf("b. 18th\n"); printf("c. 19th\n"); printf("d. 22nd\n"); scanf(" %c", &a); if (a=='c') printf("CORRECT!\n"); else printf("INCORRECT!\n"); break; case 5: printf("Who were the Anti-Federalists?\n"); printf("a. They opposed demands for a strong central government and instead supported strong states' rights and a federation of states.\n"); printf("b. They opposed the Federalists.\n"); printf("c. 19th\n"); printf("d. 22nd\n"); scanf(" %c", &a); if (a=='c') printf("CORRECT!\n"); else printf("INCORRECT!\n"); break; case 6: printf("What were some of the major weaknesses of the Articles of Confederation?\n"); printf("a. The U.S. Congress could not lay and collect taxes.\n"); printf("b. There was no national executive branch to enforce enacted legislation.\n"); printf("c. The U.S. Congress could not regulate interstate commerce.\n"); printf("d. All of the above.\n"); scanf(" %c", &a); if (a=='d') printf("CORRECT!\n"); else printf("INCORRECT!\n"); break; case 7: printf("Which amendment is the only one that has been repealed in American history?\n"); printf("a. 15th\n"); printf("b. 16th\n"); printf("c. 17th\n"); printf("d. 18th\n"); scanf(" %c", &a); if (a=='d') printf("CORRECT!\n"); else printf("INCORRECT!\n"); break; case 8: printf("What are the provisions of the Fifth Amendment?\n"); printf("I. Due process; freedom from self-incrimination; trials must be preceded by grand jury indictments;\n"); printf("II. Eminent domain\n"); printf("III. Double jeopardy\n"); printf("a. I only \n"); printf("b. II only \n"); printf("c. III only\n"); printf("d. I, II\n"); printf("e. I, II, III\n"); scanf(" %c", &a); if (a=='e') printf("CORRECT!\n"); else printf("INCORRECT!\n"); break; case 9: printf("What are the provisions of the Fifth Amendment?\n"); printf("I. Due process; freedom from self-incrimination; trials must be preceded by grand jury indictments;\n"); printf("II. Eminent domain\n"); printf("III. Double jeopardy\n"); printf("a. I only \n"); printf("b. II only \n"); printf("c. III only\n"); printf("d. I, II\n"); printf("e. I, II, III\n"); scanf(" %c", &a); if (a=='e') printf("CORRECT!\n"); else printf("INCORRECT!\n"); break; case 10: printf("TRUE or FALSE.\n"); printf("The U.S. Constitution prohibits the establishment of a state religion.\n"); printf("Enter the answer:"); scanf("%s",&b); if (strcmp("TRUE",c) == 0 || strcmp("true",c)==0 || strcmp("True",c)==0) printf("CORRECT!\n"); else printf("INCORRECT!\n"); //Compare strings by setting a string with a pre-set value and the other string based on user input. //Return 0 means that they are interpreted as equal. printf("Identify the name of this specific clause.\n"); printf("Enter the answer:"); scanf("%s", &d); if (strcmp("ESTABLISHMENT",e) == 0 || strcmp("Establishment",e)==0 || strcmp("establishment",e)==0) printf("CORRECT!\n"); else printf("INCORRECT!\n"); //Compare strings by setting a string with a pre-set value and the other string based on user input. //Return 0 means that they are interpreted as equal. break; } } while (x>0 && x<21); return 0; }