https://code.sololearn.com/cD91uVZ9yh79/?ref=app If i add scanf in this function i got strucked because if i enter 11 as input it gives welcome as result but the desired result oops please help me to solve this
7/1/2020 11:58:14 AM
Akash Poovan6 Answers
New AnswerAkash Poovan maybe you're doing something wrong it's working fine here with scanf(). #include<stdio.h> int main() { int shoe_size; scanf("%d",&shoe_size); if (shoe_size<=9) printf ("welcome"); else printf("oops"); }
Characters mentioned in scanf must be seen in the input. int h,m;scanf("%d:%d",&h,&m); Expects: 3:4
Thank you so much for your kind answers i found the mistake , that i wrote code like this [ scanf ("you shoe size%d",&shoe_size);] now i realised that nothing should be write inside a scanf.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message