#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;
}
#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;
}

thank you very much problem is solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.