Exercise 2: A structure Students is created with the following definition: struct Students { string ID, name, course[3] double mark[3]; double average; string status; }: Students Pel[10]: l a variable called Pel[10] is created from struct Students This exercise is an expansion from Exercise 1. Write a program to input data for 10 students with their IDs, names, three courses names and marks for each course. You are required to use the struct definition above. For each student,

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question
Exercise 2: A structure Students is created with the following definition:
struct Students {
string ID, name, course[3]
double mark[3];
double average;
string status;
}:
Students Pel[10]: // a variable called Pel[10] is created from struct Students
This exercise is an expansion from Exercise 1.
Write a program to input data for 10 students with their IDs, names, three courses names and
marks for each course. You are required to use the struct definition above. For each student,
find the average of the marks for the three courses taken and display the status of the average
marks obtained. In this exercise, a struct concept is used.
Algorithm:
Step 1: Start the program
Step 2: Create a structure Students, declare variables average and status, and initialize the
variables
Step 3: Obtain the students' IDs, names, courses names and marks for each course.
Step 4: Calculate average marks for each course and display appropriate status
Step 5: Obtain the result
Step 6: Display the result
Step 7: Stop
Transcribed Image Text:Exercise 2: A structure Students is created with the following definition: struct Students { string ID, name, course[3] double mark[3]; double average; string status; }: Students Pel[10]: // a variable called Pel[10] is created from struct Students This exercise is an expansion from Exercise 1. Write a program to input data for 10 students with their IDs, names, three courses names and marks for each course. You are required to use the struct definition above. For each student, find the average of the marks for the three courses taken and display the status of the average marks obtained. In this exercise, a struct concept is used. Algorithm: Step 1: Start the program Step 2: Create a structure Students, declare variables average and status, and initialize the variables Step 3: Obtain the students' IDs, names, courses names and marks for each course. Step 4: Calculate average marks for each course and display appropriate status Step 5: Obtain the result Step 6: Display the result Step 7: Stop
Input:
Enter ID123
Name: Rabimah
Course 1: Biology
Marks: 80
Course 2: Eizik
Marks: 70
Course 3: Chemistry
Marks: 75
Course 3: Add math
Marks: 60
Enter ID: 222
Name: Xogesb
Course 1: Eizik
Marks: 85
Course 2: Chemistry
Marks: 75
Course 3: Add Math
Marks: 80
Enter ID: 445
Name: Kbong
Course 1: Biology
Marks: 75
Course 2: Eizik
Marks: 60
Course 3: Add Math
Marks: 55
Transcribed Image Text:Input: Enter ID123 Name: Rabimah Course 1: Biology Marks: 80 Course 2: Eizik Marks: 70 Course 3: Chemistry Marks: 75 Course 3: Add math Marks: 60 Enter ID: 222 Name: Xogesb Course 1: Eizik Marks: 85 Course 2: Chemistry Marks: 75 Course 3: Add Math Marks: 80 Enter ID: 445 Name: Kbong Course 1: Biology Marks: 75 Course 2: Eizik Marks: 60 Course 3: Add Math Marks: 55
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Graphical User Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT