0% found this document useful (0 votes)
26 views9 pages

8 Exp

Uploaded by

vanonymous106
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views9 pages

8 Exp

Uploaded by

vanonymous106
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

//Krishika Dewan

//DIV:- A

//ROLL NO. 24

#include <stdio.h>

struct student

char firstName[50];

int roll;

int ma;

int pp;

int bx;

int ph;

int eg;

} s[10];

int main()

int i, total;

printf("Enter information of students:\n");

// storing information

for (i = 0; i < 10; i++)

s[i].roll = i + 1;

printf("\nFor roll number : %d \n", s[i].roll);

printf("Enter first name: ");

scanf("%s", s[i].firstName);

printf("\nEnter Marks in Five Subjects = ");

scanf("%d%d%d %d %d",& s[i].ma,&s[i].pp,&s[i].bx, &s[i].ph, &s[i].eg);

total = (s[i].ma + s[i].pp + s[i].bx + s[i].ph + s[i].eg);


printf("Total marks of the student = %d \n\n",total);

printf("\n Displaying Information: \n");

// displaying information

for (i = 0; i < 10; ++i) {

printf("\nRoll number : %d\n ", i + 1);

printf("First name: ");

puts(s[i].firstName);

printf("Marks in Maths: %d", s[i].ma);

printf("\n");

printf("Marks in Procedure prog: %d", s[i].pp);

printf("\n");

printf("Marks in BXE: %d", s[i].bx);

printf("\n");

printf("Marks in Physics: %d", s[i].ph);

printf("\n");

printf("Marks in Engg Graphics: %d", s[i].eg);

printf("\n");

return 0;

Output:

Enter information of students:

For roll number : 1

Enter first name: akshra


Enter Marks in Five Subjects = 99 100 100 99 98

Total marks of the student = 496

For roll number : 2

Enter first name: shreyam

Enter Marks in Five Subjects = 99

99

99

98

98

Total marks of the student = 493

For roll number : 3

Enter first name: manik

Enter Marks in Five Subjects = 99

98

95

96

98

Total marks of the student = 486

For roll number : 4

Enter first name: garima

Enter Marks in Five Subjects = 98


99

99

96

94

Total marks of the student = 486

For roll number : 5

Enter first name: somya

Enter Marks in Five Subjects = 89

76

57

90

09

Total marks of the student = 321

For roll number : 6

Enter first name: iqra

Enter Marks in Five Subjects = 89

67

44

76

84

Total marks of the student = 360

For roll number : 7

Enter first name: vaishnavi


Enter Marks in Five Subjects = 96

94

93

91

90

Total marks of the student = 464

For roll number : 8

Enter first name: aman

Enter Marks in Five Subjects = 90

93

92

89

88

Total marks of the student = 452

For roll number : 9

Enter first name: krutika

Enter Marks in Five Subjects = 91

91

89

88

85

Total marks of the student = 444


For roll number : 10

Enter first name: shruti

Enter Marks in Five Subjects = 99

97

98

99

98

Total marks of the student = 491

Displaying Information:

Roll number : 1

First name: akshra

Marks in Maths: 98

Marks in Procedure prog: 100

Marks in BXE: 100

Marks in Physics: 99

Marks in Engg Graphics: 96

Roll number : 2

First name: shreyam

Marks in Maths: 99

Marks in Procedure prog: 99

Marks in BXE: 99

Marks in Physics: 98

Marks in Engg Graphics: 98

Roll number : 3

First name: manik


Marks in Maths: 99

Marks in Procedure prog: 98

Marks in BXE: 95

Marks in Physics: 96

Marks in Engg Graphics: 98

Roll number : 4

First name: garima

Marks in Maths: 98

Marks in Procedure prog: 99

Marks in BXE: 99

Marks in Physics: 96

Marks in Engg Graphics: 94

Roll number : 5

First name: somya

Marks in Maths: 89

Marks in Procedure prog: 76

Marks in BXE: 57

Marks in Physics: 90

Marks in Engg Graphics: 9

Roll number : 6

First name: iqra

Marks in Maths: 89

Marks in Procedure prog: 67

Marks in BXE: 44

Marks in Physics: 76

Marks in Engg Graphics: 84

Roll number : 7
First name: vaishnavi

Marks in Maths: 96

Marks in Procedure prog: 94

Marks in BXE: 93

Marks in Physics: 91

Marks in Engg Graphics: 90

Roll number : 8

First name: aman

Marks in Maths: 90

Marks in Procedure prog: 93

Marks in BXE: 92

Marks in Physics: 89

Marks in Engg Graphics: 88

Roll number : 9

First name: krutika

Marks in Maths: 91

Marks in Procedure prog: 91

Marks in BXE: 89

Marks in Physics: 88

Marks in Engg Graphics: 85

Roll number : 10

First name: shruti

Marks in Maths: 99

Marks in Procedure prog: 97

Marks in BXE: 98

Marks in Physics: 99

Marks in Engg Graphics: 98


...Program finished with exit code 0

Press ENTER to exit console.

You might also like