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

Each of the following definitions has errors. Locate as many as your can. int nu

ID: 3571824 • Letter: E

Question

Each of the following definitions has errors. Locate as many as your can. int numbers[8] = {1, 2, 4, 5} double ratings[]; values [3] = {6, 8..2, 'A'); int size = 10; double values [size] Write a program that complete the following tasks sequentially: Accepts up to 20 integer test scores in the range of 0 to 100 from the user and stores them in an array. Use a sentinel to end reading if there are less than 20 scores, and prompt user to reenter a score if it is out of range. Then, write a loop to scan through the array, and calculate/display how many perfect scores were entered (i.e., scores of 100). Rewrite the program in Problem 8 so that the program uses a value-returning countPerfect function to report the perfect scores in an array. Write a program that displays the roman numeral equivalent of any decimal number between 1 and 20 that the user enters. The roman numerals should be stored in an array of strings and the decimal number that the user enters should be used to locate the array element holding the roman numeral equivalent. The program should have a loop that allows the user to continue entering numbers until an end sentinel of 0 is entered.

Explanation / Answer

Hi, I have answered all the parts of first question.

Please repost other questions in separate post.

Please let me know in case of any issue.


7)
   a)
       int numbers[8] = {1,2,,4,,5};

       Error:
           THere are extra comma between two numbers in initialization part
           Size specified is 8 but we have mentioned only 4 elements

   b)
       double ratings[];

       Error:
           Array size is not mentioned in delaration part

   c)
       values[3] = {6, 8.2, 'A'};

       Error:
           Data type of array is not given in declartion
           Also all three vaues are of differen type.All the elements of array should be if same type

   d)
       int size = 10;
       double values[size];

       Error:
           Array size mentioned in [] should be of type constant

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