- 1
I need help fixing this code to take details from user and print it on the screen as entered by user
6 ответов
+ 2
Amah Emmanuel Additionally to what visph pointed out about the size of the data type, if you need to work with numbers that possibly include leading zeroes, e.g. credit card numbers or mobile numbers, integral data types might not be suited as those zeroes will not be stored. Strings would be a better choice in that case.
+ 3
just replace:
scanf("%s", &a);
by:
scanf("%s", a);
+ 3
because the number is too big ^^
just replace 'int x' with 'long x' and both '%d' by '%ld': you will handle higher upper limit ;)
+ 2
working fine for me:
https://code.sololearn.com/cnm8bIHG2vir/?ref=app
btw, you must enter number without separators (neither spaces nor anything else -- dot, dash...), and in sololearn you must provide input as once, each on a new line:
toto
1234567890
0
Still prints random numbers instead of numbers inputs by user
0
When I enter 08101519793 it outputs -488414799