//program to store data of student and asking user giev his roll number to know his result....
#include<iostream.h>
usnibg namespace std;
void main( )
{
int ali roll num=12345;
int ahmed roll num=54321;
int shahab roll num=1993;
int shahroze roll num=1994;
int roll num;
cout<<"enter your role number ";
cin>>roll num;
if(roll num==ali roll num)
{
cout<<"name:ali"<<endl;
cout<<"total marks=1111"<<endl;
cout<<"obtained marks=723"<<endl;
cout<<"percentage=66%";
}
if(roll num==ahmed roll num)
{
cout<<"name:ahmed"<<endl;
cout<<"total marks=1111"<<endl;
cout<<"obtained marks=456"<<endl;
cout<<"percentage=45%";
}
if(roll num==shahab roll num)
{
cout<<"name:shahb"<<endl;
cout<<"total marks=1111"<<endl;
cout<<"obtained marks=796<<endl;
cout<<"percentage=73%";
}
if(roll num==shahroze roll num)
{
cout<<"name:shahroze"<<endl;
cout<<"total marks=1111"<<endl;
cout<<"obtained marks=721"<<endl;
cout<<"percentage=66%";
}
else
{
cout<<"your typed wrong roll num";
}
system("pause");
}
#include<iostream.h>
usnibg namespace std;
void main( )
{
int ali roll num=12345;
int ahmed roll num=54321;
int shahab roll num=1993;
int shahroze roll num=1994;
int roll num;
cout<<"enter your role number ";
cin>>roll num;
if(roll num==ali roll num)
{
cout<<"name:ali"<<endl;
cout<<"total marks=1111"<<endl;
cout<<"obtained marks=723"<<endl;
cout<<"percentage=66%";
}
if(roll num==ahmed roll num)
{
cout<<"name:ahmed"<<endl;
cout<<"total marks=1111"<<endl;
cout<<"obtained marks=456"<<endl;
cout<<"percentage=45%";
}
if(roll num==shahab roll num)
{
cout<<"name:shahb"<<endl;
cout<<"total marks=1111"<<endl;
cout<<"obtained marks=796<<endl;
cout<<"percentage=73%";
}
if(roll num==shahroze roll num)
{
cout<<"name:shahroze"<<endl;
cout<<"total marks=1111"<<endl;
cout<<"obtained marks=721"<<endl;
cout<<"percentage=66%";
}
else
{
cout<<"your typed wrong roll num";
}
system("pause");
}
No comments:
Post a Comment