C++ Standard Input Question, Two Inputs

Question

Write a program that accepts two integer numbers from the standard input and then prints them.

You can use the following code structure.

#include <iostream> 

int main() 
{ 
    //your code here
} 


#include <iostream> 

int main() 
{ 
    std::cout << "Please enter two integer numbers: "; 
    int x; 
    int y; 
    std::cin >> x >> y; 
    std::cout << "You entered: " << x << " and " << y; 
} 



PreviousNext

Related