How to input two integers in one line with C++

1 Answer

0 votes
#include <iostream>

using std::cin;
using std::cout;
using std::endl;

int main()
{
	int n1, n2;
	
	cin >> n1 >> n2;
	
	cout << n1 << " " << n2 << endl;
	
	return 0; 
} 


/*
run:

23 998
23 998

*/

 



answered Jun 5, 2018 by avibootz

Related questions

1 answer 147 views
1 answer 109 views
1 answer 227 views
1 answer 169 views
2 answers 119 views
...