Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that prompts for and reads in test scores. You may assume that v

ID: 441510 • Letter: W

Question

Write a program that prompts for and reads in test scores. You may assume that valid test scores will be integer values between 0 and 100. You may also assume that the user will not enter more than 35 test scores. Use a preprocessor directive to define this value. User input will be complete when the user enters a -1 for the test score. When all of the test scores have been entered, the program will print out the scores. Use a while or do-while loop to read in the values. Use a for loop to print out the values. Sample output: Enter test score 1: 88 Enter test score 2: 67 Enter test score 3: 74 Enter test score 4: -1 Number of scores entered: 3 Test scores entered : 88 67 74

Explanation / Answer

#includeint main(){ int count =0 ,i , score[35]; while(1){ printf("Enter test score %d :",count+1); scanf("%d",&score[count]); if(score[count]==-1)break; count++; } printf("Number of scores entered : %d ",count); printf("Test Scores Entered :"); for(i=0;i

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote