Computer Science, asked by priyas333com, 1 month ago

c program for marksheet for students using structure​

Answers

Answered by veeraswamy708
0

Enter the mark of subject-1 : 85.Enter the mark of subject-1 : 75.Enter the details of 1 students :Mark Sheet.

Name of Student : H.Xerio Roll No : 536435.

I hope it May helpful to you ...

Answered by divyadivi1206
1

Answer:

Explanation:

#include<iostream>

using namespace std;

int main()

{

cout<<"STUDENT MARKSHEET USING STRUCTURES"<<endl;

cout<<"Enter the no of students"<<endl;

int a,avg,avg1;

cin>>a;

int rn,s1,s2,s3,s4,s5,grade,rn1,s11,s21,s31,s41,s51,grade1;

cin>>rn>>s1>>s2>>s3>>s4>>s5>>rn1>>s11>>s21>>s31>>s41>>s51;

avg=(s1+s2+s3+s4+s5)/5;

avg1=(s11+s21+s31+s41+s51)/5;

if(avg>avg1)

grade=1;

else

grade=2;

cout<<"rn"<<" "<<"s1"<<" "<<"s2"<<" "<<"s3"<<" "<<"s4"<<" "<<"s5"<<" "<<"avg"<<" "<<"grade"<<endl;

cout<<rn<<" "<<s1<<" "<<s2<<" "<<s3<<" "<<s4<<" "<<s5<<" "<<avg<<" "<<grade<<endl;

cout<<rn1<<" "<<s11<<" "<<s21<<" "<<s31<<" "<<s41<<" "<<s51<<" "<<avg1<<" "<<grade1<<endl;

}

Similar questions