← Back to topics
Topic

new in this site

b
bour1992
First of all, I use c++ to solve the problems.

I have seen in a lot of problems in this site that i should read from the first line of the input two integers.
How can i read two different integers from a single line?
a
adminModerator
depends what programming language you are using.

if you are using c or c++ you can do it this way:
scanf("%d %d", &a &b);
or
cin >> a >> b;

if you are using pascal you can do it by doing readln(a, b);