Professional Documents
Culture Documents
int main()
int marks[10];
gradeA++;
gradeB++;
gradeC++;
gradeD++;
else
gradeF++;
}
cout << "How many student got A Grade : " << gradeA << endl;
cout << "How many student got B Grade: " << gradeB << endl;
cout << "How many student got C Grade: " << gradeC << endl;
cout << "How many student got D Grade: " << gradeD << endl;
cout << "How many student got F Grade: " << gradeF << endl;
return 0;
2. Write a program that stores 10 values in an array and display minimum no from
array and show on screen.
#include<iostream>
int main()
cin>> a[i];
min = a[i];
if ( a[i]< min)
min = a[i];
}
return 0;
3. Write a program that stores 10 values in an array and display maximum no from
array and show on screen
#include<iostream>
int main()
cin>> a[i];
max = a[i];
if ( a[i]> max)
max = a[i];
return 0;
4. Write a program that use 3 arrays in c++ of book, notebooks and pencil by user and
display calculate total bill price of one notebook is 150 Rs, price of one book is 150
and price of one pencil is 50 by using array in c++.
#include<iostream>
int main()
int q[ 3] , i;
cin>> q[i];
pr[i] *=q[i];
total_bil +=pr[i];
return 0;
5. Write a program that input 10 floating number in an array. It displays value which
are greater than average value in an array.
#include<iostream>
int main()
int i;
for(i =0 ; i<10 ; i++)
cin>> a[i];
sum += a[i];
if (a[i]> avg)
g = a[i];
cout<< " The greater number then avg value in an array is = "<< g <<endl;
return 0;
#include <iostream>
gradeA++;
else if ((m[i] >= 80) &&( m[i] < 90) )
gradeB++;
return gradeC++;
gradeD++;
else
gradeF++;
cout << "How many student got A Grade : " <<gradeA << endl;
cout << "How many student got B Grade: " << gradeB << endl;
cout << "How many student got C Grade: " << gradeC << endl;
cout << "How many student got D Grade: " << gradeD << endl;
cout << "How many student got F Grade: " << gradeF << endl;
int main()
int marks[10];
st(marks ,10);
return 0;
2. Write a program that stores 10 values in an array and display minimum no from array
and show on screen.
#include<iostream>
int min ;
min = m[0];
if ( m[i]< min)
min = m[i];
int main()
cin>> a[i];
mi(a , 10);
return 0;
3. Write a program that stores 10 values in an array and display maximum no from array
and show on screen.
#include<iostream>
int min ;
min = m[0];
if ( m[i]< min)
min = m[i];
int main()
cin>> a[i];
mi(a , 10);
return 0;
4. Write a program that use 3 arrays in c++ of book, notebooks and pencil by user and
display calculate total bill price of one notebook is 150 Rs, price of one book is 150 and
price of one pencil is 50 by using array in c++.
#include<iostream>
p[i] *=qu[i];
total_bil +=p[i];
int main()
int q[ 3] , i;
cin>> q[i];
bil(q , n , pr , 3);
return 0;
5. Write a program that input 10 floating number in an array. It displays value which are
greater than average value in an array.
#include<iostream>
sum += b[i];
if (b[i]> avg)
g = b[i];
}
cout<< " The greater number then avg value in an array is = "<< g <<endl;
int main()
float a[10];
cin>> a[j];
gr(a , 10);
return 0;