Monday, 18 May 2015

Write a Program in c++ which store the marks of five students in an array and then print all the marks.

Coding:- 


    #include<iostream.h>
void main()
{
 int marks[5]= {50,60,70,80,90};
int i;

 cout<<"the marks of students are: \n";

 for(i=0;i<=4;i++)

 cout<<"marks of " << i+1<<"student is :" << marks[i]<<endl;


}

Output:- 

    

No comments:

Post a Comment