0
Not getting desired output
Fix the bug in this code output should be price : $12 but my output is 12 #include <stdio.h> int main() { int price = 12; price = 12; printf("%d",price); return 0; }
9 Respuestas
+ 5
You have not used $ anywhere in the program. Have you tried to put it in the printf()?
+ 2
show what you have tried
+ 1
great that you found a solution!
+ 1
No, I did not solve this code, this code is solved by a sololearner (Surajit Roy)
0
Yes I have tried and it doesn't work
0
#include<stdio.h>
int main(){
int price= 12;
price= 12;
Printf("%d",$price);
return 0;
}
And second time I tried this👇
#include<stdio.h>
int main(){
int price= $12;
price= $12;
Printf("%d",$price);
return 0;
}
0
would type in correct format for getting output price:$12
0
it is printf, not Printf
$ has to go inside the string, before the format specifier for the number.
0
By mistake in code message I typed P
But now my problem is solved