0
A difficulty about C
When I try to write a simple C program with iPad, but if I use “scanf” statement and then click RUN to run. System always show me Looks like your program has no input. How can I solve this problem. #include <stdio.h> int main() { int a,b,sum; printf("Please input a,b:\n"); scanf("%d%d",&a&b); sum=a+b; printf("%d",sum); return 0; } These code is only to help me test software. I’m a new learner.
7 Antworten
+ 2
use comma between &a and &b just like this (&a,&b);
+ 1
can you show us the code?
+ 1
thanks emmey
0
show me your source code
0
No, use comma can’t solve it. Maybe App doesn’t support the function of “scanf()”
0
Awanish is right. That is the only issue. Other than that the code runs fine. put a , between them in the scanf line.
0
Oh, yeah! I get it. Thanks Avi Srivastava and Emmey.