+ 3
How do I assign to the input a value x in C?
I'm trying to solve a problem with C, how can I make x = input? In the problem I'm trying to solve the input is a number
3 odpowiedzi
+ 6
For integer:
int x;
scanf("%d",&x);
For decimal number:
double x;
scanf("%lf",&x);
+ 6
int a;
scanf("%d", &a);
+ 2
Ty