#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
string name="Enter Your Name"; ( Yaha pr name likhna apna)
string vuID = "Enter Your VuID"; (Yaha pr Id likhni hai apni)
string div;
int sub1, sub2, sub3, sub4, sub5;
int total;
float avg;
cout<<"Enter marks for first subject: ";
cin>>sub1;
cout<<"Enter marks for second subject: ";
cin>>sub2;
cout<<"Enter marks for Third subject: ";
cin>>sub3;
cout<<"Enter marks for fourth subject: ";
cin>>sub4;
cout<<"Enter marks for Fifth subject: ";
cin>>sub5;
total = sub1+sub2+sub3+sub4+sub5;
avg = total/5.0;
if(avg>=60){
div = "First Division";
}
else if(avg>=45 && avg<60)
{
div = "Second Division";
}
else if( avg>=33 && avg<45)
{
div = "Third Division";
}
else
{
div = "Fail";
}
system("cls");
cout<<"Student Name: "<<name<<endl;
cout<< "Student ID: "<<vuID<<endl;
cout<< "Obtained Marks: "<<total<<"/500"<<endl;
cout<<"Average: "<<avg<<"%"<<endl;
cout<<"Division:" <<div<<endl;
return 0;
}
Output Result:
Click below to PDF file download👇
Click below to TEXT file download👇
Post a Comment