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 Answers
+ 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.