Without altering the program structure, complete the following program that ask the user to enter 135...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Without altering the program structure, complete the following program that ask the user to enter 135 student names and their midterm exam score. Then the program prints each student name with their exam score. It will then call a function to calculate the average exam score and print the average score. #include //----struct definition---- struct studentRecord { char name[20]; double examScore[135]; }; //----function definition---- void grade (/(a) fix me: */){ int i; double sum= 0; for(i=0;i <135;i++){ sum = /*(b) fix me: "/; (f) (a) } printf(" Exam average: %lf", sum/3); } void main(){ int i; //----struct declaration---- /" (c) fix me: struct variable that can store info for 135 students"; //----get students name and exam score---- for(i=0;i <135;i++){ printf(" Enter student%d name: ",i+1); scanf("%s", / (d) fix me: store name of each students" /); printf(" Enter student%d exam score: ",i+1); scanf("%lf", " (e) fix me: store each students exam score"); } //----print student names = exam score---- for(i=0;i <135;i++){ printf(" %s = %lf", / (f) fix me: print student name and exam score*/); } //----call function to calculate exam average and print ---- grade(/*(8) fix me: */0); Enter your answer below: (a) (b) (c) (d) Without altering the program structure, complete the following program that ask the user to enter 135 student names and their midterm exam score. Then the program prints each student name with their exam score. It will then call a function to calculate the average exam score and print the average score. #include //----struct definition---- struct studentRecord { char name[20]; double examScore[135]; }; //----function definition---- void grade (/(a) fix me: */){ int i; double sum= 0; for(i=0;i <135;i++){ sum = /*(b) fix me: "/; (f) (a) } printf(" Exam average: %lf", sum/3); } void main(){ int i; //----struct declaration---- /" (c) fix me: struct variable that can store info for 135 students"; //----get students name and exam score---- for(i=0;i <135;i++){ printf(" Enter student%d name: ",i+1); scanf("%s", / (d) fix me: store name of each students" /); printf(" Enter student%d exam score: ",i+1); scanf("%lf", " (e) fix me: store each students exam score"); } //----print student names = exam score---- for(i=0;i <135;i++){ printf(" %s = %lf", / (f) fix me: print student name and exam score*/); } //----call function to calculate exam average and print ---- grade(/*(8) fix me: */0); Enter your answer below: (a) (b) (c) (d)
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Briefly describe ASCII and Unicode and draw attention to any relationship between them. [3 marks] (b) Briefly explain what a Reader is in the context of reading characters from data. [3 marks] A...
-
The following information is computed from Fast Food Chains annual report for 2006. 2006 2005 Current assets $ 2,731,020 $ 2,364,916 Property and equipment, net 10,960,286 8,516,833 Intangible...
-
Consider how economic conditions affect the default risk premium. Do you think the default risk premium will likely increase or decrease during this semester? How do you think the yield curve will...
-
The Tate Corp. has annual sales of $34 million. The ACP is 33 days. What is the average investment in accounts receivable as shown on the balance sheet?
-
For each of the following sets of numbers, calculate the sample size \((N)\), the mean \(\mathrm{X}^{-}\) , the standard deviation \((s)\), and the standard error of the mean \(s \mathrm{X}^{-}\): a....
-
The manager of a small convenience store does not want her customers standing in line for too long prior to a purchase. In particular, she is willing to hire an employee for another cash register if...
-
A picture is printed on an 7-17"-by-7" piece of photographic paper and placed symmetrically in a frame whose opening is 7" by 6". What are the dimensions of the strips on the sides of the picture...
-
A prime number is a whole number which has only two divisors, I and itself. The simplest way to test primality of a number is to keep dividing it by prime numbers that are smaller than or equal to...
-
Your company owns a vacant plot in a suburban area. What is the advantage of waiting to develop the plot?
-
Show how a share of equity can be viewed as an option. Why is this perspective helpful?
-
Ventiora SpA has a disused warehouse it is holding till land prices increase before selling to potential buyers. In option terminology, what type of option(s) does the company have on the warehouse?
-
Provide an overview of the private equity market. Why would firms wish to go private once they have listed on a stock exchange? In April 2015, Rangers International Football Club plc delisted from...
-
What is a convertible bond? What are the key features of such a security?
-
The following questions are about the data presented in Figure 2. (a) Cyclic compressive and tensile stresses are applied axially on a cylindrical shaft made of 1045 steel. If the amplitude of the...
-
Find the radius of convergence in two ways: (a) Directly by the CauchyHadamard formula in Sec. 15.2. (b) From a series of simpler terms by using Theorem 3 or Theorem 4.
-
The variation of gravitational acceleration g with altitude y is given by g = R2/(R + y)2 g0 where R = 6371 km is the radius of the earth, and g0 = 9.81 m/s2 is the gravitational acceleration at sea...
-
Define x as a symbolic variable and create the two symbolic expressions S1 = x2(x - 6) + 4(3x - 2) and S2 = (x + 2)2 - 8x Use symbolic operations to determine the simplest form of each of following...
-
The arc length of a segment of a parabola ABC of an ellipse with semi-minor axes a and b is given approximately by: LABC = 1/2b2 + 16a2 + b2/8a In(4a + b2 + 16a2)/b. (a) Determine LABC if a = 11 in....
-
Generally, an employer is responsible for ensuring that its workplace is safe and, therefore, for any violations of OSHA standards. The instant case implicates a narrow exception to that rule: An...
-
In January 2016, Caseys notified employees at its Ankeny warehouse about a new drug-testing policy authorized under Iowa Code section 730.5. That statute allows private employers to conduct drug and...
-
Brad has worked in the marketing department of So Clean! for the last five years. So Clean! is a company that produces household cleaners. Brad is an excellent employee and was recently promoted....
Study smarter with the SolutionInn App