Write a program that takes input for name, score and school year for 3 students. Print the output back with average score along with names, school year and score of three students. You will need 3 string variables to store names of 3 students, 3 double variables to store scores of 3 students, and 3 character variables to store school year of 3 students. You can define average as a double variable. You need to use ignore and clear function of iostream to make sure data is read correctly and completely. You might need to use cin.ignore(200,'\n') to ignore 200 characters or new line whatever comes first. Make sure your program gives input and output in following manner.
Write a
Print the output back with average score along with names, school year and score of three students.
You will need 3 string variables to store names of 3 students, 3 double variables to store scores of 3 students, and 3 character variables to store school year of 3 students. You can define average as a double variable.
You need to use ignore and clear function of iostream to make sure data is read correctly and completely. You might need to use cin.ignore(200,'\n') to ignore 200 characters or new line whatever comes first. Make sure your program gives input and output in following manner.
This is for Dev C++
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images