Monday 11 January 2016

Write A program that Store information of student in Structure including Roll no, Marks, Avg, Grade in Dev c++

#include<iostream>
using namespace std;
struct student
{int rollno;
 int marks;
 float avg;
 char grade;
 };
main()
{ student s;
   cout<<"Enter the information of Student"<<endl<<endl;
   cout<<"Enter Roll NO of student"<<endl;
   cin>>s.rollno;
   cout<<"Enter the Marks"<<endl;
   cin>>s.marks;
   cout<<"Enter avg"<<endl;
   cin>>s.avg;
   cout<<"Enter The Grade OF Student"<<endl;
   cin>>s.grade;
    cout<<"Roll NO of student  "<<s.rollno<<endl;
   cout<<"Marks are = "<<s.marks<<endl;
   cout<<"Avg is = "<<s.avg<<endl;
   cout<<"Grade is  "<<s.grade;
 
}

No comments:

Post a Comment