0
#include <iostream>
using namespace std;
int main()
{
    int n1,n2,n3,n4,n5;
    cout<<"input number\n";
    cin>>n1;
    cout<<"input number\n";
    cin>>n2;
    cout<<"input number\n";
    cin>>n3;
    cout<<"input number\n";
    cin>>n4;
    cout<<"input number\n";
    cin>>n5;
    if (n1>n2 && n1>n3)



    return 0;
}

Edited by Dani: Formatting fixed

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by gameguy91
1
#include<iostream>
using namespace std;
int main()
{
int n1,n2,n3,n4,n5;
cout<<"input number1\n";
cin>>n1;
cout<<"input number2\n";
cin>>n2;
cout<<"input number3\n";
cin>>n3;
cout<<"input number4\n";
cin>>n4;
cout<<"input number5\n";
cin>>n5;
//if (n1>n2 && n1>n3)

if(n1 < n2)
   n1 = n2;
if(n1 < n3)
   n1 = n3;
if(n1 < etc....)
   etc....

cout << "\nThe largest number is : " << n1 <<endl<<endl;
  
return 0;
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.