Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ language Create a sequential file Students.txt and open it for output. Allow the user to input the ID(integer), Name(string) and GPA (double) until ctrl-z

image text in transcribed

c++ language

Create a sequential file Students.txt and open it for output. Allow the user to input the ID(integer), Name(string) and GPA (double) until ctrl-z is pressed and make sure store them inside the file Students.txt separated by a space. Read from the file the five GPA values and find the lowest and highest values. Calculate the average GPA. Store the lowest, highest and average GPA inside another binary file Results.txt Close Results.txt then open it to read and display the results on the screen. The following is a sample output for the program: Enter the ID, Name and GPA for student 1: 20121111 John 3.5 Enter the ID, Name and GPA for student 2: 20122222 Jane 3.7 Enter the ID, Name and GPA for student 3: 20123333 Alex 3.6 Enter the ID, Name and GPA for student 4: 20124444 Kara 3.4 Enter the ID, Name and GPA for student 5: 20125555 Lana 3.8 Lowest GPA: 3.4 Highest GPA: 3.8 Average GPA: 3.6 Press any key to continue

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

Students also viewed these Databases questions

Question

Discuss the scope of Human Resource Management

Answered: 1 week ago

Question

Discuss the different types of leadership

Answered: 1 week ago

Question

Write a note on Organisation manuals

Answered: 1 week ago

Question

Define Scientific Management

Answered: 1 week ago

Question

Explain budgetary Control

Answered: 1 week ago

Question

=+j Describe an effective crisis management program.

Answered: 1 week ago