Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Array Programs 1. Create the following: a) Two global integer constants, NUM_STUDENTS3, NUM_GRADES-4. b) One dimensional string array of size NUM_STUDENTS, named students. c) Two

image text in transcribed

image text in transcribed

image text in transcribed

Array Programs 1. Create the following: a) Two global integer constants, NUM_STUDENTS3, NUM_GRADES-4. b) One dimensional string array of size NUM_STUDENTS, named students. c) Two dimensional integer array of size NUM_STUDENTS by NUM_GRADES named grades. d) Initialize students with "Alice", "Brenda" and "Chris" e) Initialize grades with: Array 1 76, 80, 88, 90 (Alice' s grades) Array 2: 57, 98, 69, 93 (Brenda's grades) Array 3: 98, 83, 76, 85 (Chris's grades) f) Create an output function that outputs: Student: Alice Grades:76, 80, 88,90 Student: Brenda Grades:57, 98, 69, 93 Student: Chris Grades: 98, 83, 76, 85 g) Implement an average function that computes the average of all grades stored in the array. h) Modify the output function so that it calls the average function and displays the GPA as shown in the example output. Example Output Student: Alice Grades:76, 80, 88, 90 GPA: 83.5 Student: Brenda Grades: 76, 80, 88, 90 GPA: 79.25 Student: Chris Grades: 76, 80, 88, 90 GPA: 85.5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions