DEV Community

Mohammed Salah
Mohammed Salah

Posted on

C++15th Code ( cerr & cout)

    #include<iostream>
    using namespace std; 
    int main()
    {
    cout<<"\n \t \t\t Enter (a)  > (b )\n\n "; 
float a , b  ; 
cout<<"\n  \t Enter  the first number a : ";
cin>> a; 
cout<< " \n\t Enter The second number b : " ; 
cin>>b; 
if (a>b)
{
 cout<<" \n The largest number is a = "<<a<<endl;
}
else 
{
cerr<<"\n \t\t  There is Error "; 
cout<<"\n \t \t  ther is  error ";
}
cin.get();
return 9 ; 
    }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →