CJCoding With Joseph
15free / daySign inCreate account

Define a struct type named Student with a text field name and an integer field grade. Create an array of 3 Students: Ann with 85, Ben with 90, and Cara with 95. Loop over the array printing each student as name: grade on its own line, then print the average grade (integer division of the total by 3) as Average: 90 on a final line. Each line ends with a newline. This combines an array of structs with a running total.

Expected output

Ann: 85
Ben: 90
Cara: 95
Average: 90

= newline. The output ends with a newline, so print one after the last line.

Hints4 available
Topics
Structs
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.