/** Copyright and version declaration section of the Program * Copyright (c) 2013, student * All rightsreserved from computer College of Yantai University. * file name: riqi. cpp * Author: Li Yang * Completion Date: July 15, March 5, 2013 * version: v1.0 * input Description: * Problem description: defines a structure array of student scores. Output the student ID, name, total score, and average score of each student. */# Include <iostream> # include <iomanip> using namespace std; struct Student {long num; char name [10]; double sum; double average; double score1; double score2; double score3 ;}; int main () {Student array [3]; cout <"Enter the student ID, name, C ++ score, English score, and high score of the three students in sequence. "<Endl; for (int I = 0; I <3; ++ I) {cin> array [I]. num> array [I]. name> array [I]. score1> array [I]. score2> array [I]. score3; array [I]. sum = array [I]. score1 + array [I]. score2 + array [I]. score3; array [I]. average = array [I]. sum/3;} cout <"student ID" <setw (12) <"name" <setw (10) <"C ++ score" <setw (10) <"English score" <setw (10) <"high score" <setw (8) <"total score" <setw (8) <"average score" <endl; for (int I = 0; I <3; ++ I) {cout <array [I]. num <setw (12) <array [I]. name <setw (8) <array [I]. score1 <setw (8) <array [I]. score2 <setw (8) <array [I]. score3 <setw (12) <array [I]. sum <setw (6) <array [I]. average <endl;} return 0 ;}