C++ Program to Print Two Integers (Entered by the User).
#include <iostream>
using namespace std;
int main()
{
int x,y;
cout<<"\n Enter x and y values:";
cin>>x>>y;
cout << "\n Display x and y values : " <<x<<" "<<y<< endl;
return 0;
}
Output:
Enter x and y values:31 36
Display x and y values : 31 36
#include <iostream>
using namespace std;
int main()
{
int x,y;
cout<<"\n Enter x value :";
cin>>x;
cout<<"\n Enter y value :";
cin>>y;
cout << "\n Display x value : " <<x<< endl;
cout << "\n Display y value : " <<y<< endl;
return 0;
}
Output:
Enter x value :31
Enter y value :36
Display x value : 31
Display y value : 36