-->
当前位置:首页 > 题库

PROGRAMMING:Store Information of Students Using Structure

Luz5年前 (2021-05-10)题库416
In this program, a structure, student is created.
This structure has three members: name (string), roll (integer) and marks (float).
Then, we created a structure array of size 5 to store information of 5 students.
Using for loop, the program takes the information of 5 students from the user and displays it on the screen.
###Input:
Input information of 5 students.
### Output:
Display information of every student.
###Sample of input:
```in
Jack 1 34.5
Tom 2 22.9
Jone 3 80.3
Mark 4 77.2
Jane 5 60.3
```
###Sample of output:
```out
Roll number: 1
Name: Jack
Marks: 34.5
Roll number: 2
Name: Tom
Marks: 22.9
Roll number: 3
Name: Jone
Marks: 80.3
Roll number: 4
Name: Mark
Marks: 77.2
Roll number: 5
Name: Jane
Marks: 60.3
```







answer:If there is no answer, please comment