1. Describe two dimensional array. write a program
to explain the working and concept of two dimensional Array
2make a marksheet in cpp. Ask to user for marks
of all his/her subjects and display the individual
marks and percentage using function
1. Describe two dimensional array. write a program
to explain the working and concept of two dimensional Array
2make a marksheet in cpp. Ask to user for marks
of all his/her subjects and display the individual
marks and percentage using function
Mujy samjh me nh aya
Pur -Soze Diloon Ko Jo Muskan Na De Paa,e <======
Sur Hi NaMile jis se wo Saaz Hi Badal Dalo....
?
C++ ka program banana he 1 dimensional array se ap progra banana he
2 C++ me marksheet nanani he marks ka user se poncha jay phir har subject ki marks display kare
#include<iostream.h>
#include<conio.h>
#include<string>
void main()
{
string b;
int a[4],result=0;
cout<<"Please Enter Name of Student ";
cin>>b;
for(int i=0;i<=3;i++)
{
switch(i)
{
case 0:
cout<<"Please Enter Marks for English ";
cin>>a[i];
break;
case 1:
cout<<"Please Enter Marks for Urdu ";
cin>>a[i];
break;
case 2:
cout<<"Please Enter Marks for Physics ";
cin>>a[i];
break;
case 3:
cout<<"Please Enter Marks for Computer Science ";
cin>>a[i];
break;
default:
cout<<"No Subject Selected"<<endl;
break;
}
}
for(int i=0;i<=3;i++)
{
result=result+a[i];
}
cout<<"\n"<<b<<"'s Total marks are "<<result<<" "<<endl<<b<<"'s Marks in each subject are given below"<<endl;
for(int i=0;i<=3;i++)
{
switch(i)
{
case 0:
cout<<"English Marks = "<<a[i]<<endl;
break;
case 1:
cout<<"Urdu Marks = "<<a[i]<<endl;
break;
case 2:
cout<<"Physics Marks = "<<a[i]<<endl;
break;
case 3:
cout<<"Computer Science Marks = "<<a[i]<<endl;
break;
default:
cout<<"No Subject Selected"<<endl;
break;
}
}
getch();
}
[FONT="Comic Sans MS"][CENTER][SIZE="5"][B][COLOR="MediumTurquoise"]"The nicest people tend to often be the ones who have been mistreated the most."[/COLOR][/B][/SIZE][/CENTER][/FONT]
In ko kis program mein type karna hai
C++ ke liye konsa software zarori hai.
tarbo
Bookmarks