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,

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education