66 840
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #7405 in C++ for bilal ahsan

Question #7405
C++ programing to input for integers.find out the largest value and then print it on the screen by using nested if structur
Expert's answer
#include "stdafx.h"
#include <iostream>
#include
<conio.h>

using namespace std;

int _tmain(int argc, _TCHAR*
argv[])
{
int number;
int arrayofnumber[10000];
cout<<"Enter
number of element in array: ";
cin>>number;
for(int
i=0;i<number;i++){
cin>>arrayofnumber[i];
}
int
LargestNumber=arrayofnumber[0];
for(int
i=0;i<number;i++){
if(LargestNumber<arrayofnumber[i]){
LargestNumber=arrayofnumber[i];
}
}
cout<<"The
largest value is: "<<LargestNumber;
getch();

return 0;
}

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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions