76 309
Assignments Done
Successfully Done
In May 2019

Answer to Question #48656 in C++ for nazi khan

Question #48656
how to print ten no and how to find max among them
Expert's answer
/* Answer on Question#48656 - Subject - Programming, C++ */
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
int i, j,S; //index
int a[9];
bool *mas; //bool array

cout << "Enter 10 numbers: \n";
for ( i=0; i<=9; i++)
cin >> a[i];

//print numbers
cout << "Entered numbers are: ";
for ( i=0; i<=9; i++ )
cout << a[i] <<" ";
// search for max number

int max = a[0];
for ( i = 1; i < 9; i++ )
if (a[i] > max)
max = a[i];
cout <<endl<<"Max number is: "<<max<<endl;


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions