[Cpp]/** Copyright (c) 2012, School of Computer Science, Yantai University * All rights reserved. * file name: test. cpp * Author: Fan Lulu * Completion Date: July 15, December 18, 2012 * version: v1.0 ** input Description: No www.2cto.com * Problem description: outputs student information using struct * program output: student Information * Problem Analysis: * Algorithm Design: omitted */# include <iostream> # include <iomanip> using namespace std; struct Student {long StuNo; char StuName [20]; int age; char sex; float score ;}; int main () {int I; Student Stu [6]; for (I = 0; I <6; I ++) {cin> Stu [I]. stuNo> Stu [I]. stuName> Stu [I]. age> Stu [I]. sex> Stu [I]. score;} www.2cto.com cout <endl; cout <"student ID" <setw (10) <"name" <setw (10) <"Age" <setw (10) <"gender" <setw (10) <"score" <endl; for (I = 0; I <6; I ++) {cout <Stu [I]. stuNo <setw (10) <Stu [I]. stuName <setw (10) <Stu [I]. age <setw (10) <Stu [I]. sex <setw (10) <Stu [I]. score; cout <endl;} return 0 ;}