Page 1 of 1

C/C++ I/O (parsing)

Posted: Mon Oct 20, 2003 1:40 am
by minskcity
Can anybody post here the easiest (the most simple, the fastest to code) way to read following form of input:

int1 (int2) int3

for example:

12 (-234) 456
or
-434 (5673) -82

Posted: Mon Oct 20, 2003 5:33 am
by UFP2161
[c]int a,b,c; scanf ("%d (%d) %d", &a, &b, &c);[/c]