When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
22 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
this is the output ): it doesnt allow me to input anything after size
scanf("%d", &dish_size) will not accept "m"
%d is for decimal numbers like 1 and 2
so scanf "%d" returns 0 to indicate that it failed
and it leaves the "m" for someone else to deal with
so %c ? ):
not with int
the target variable needs to be a char
and the format needs to be " %c" with a space
you'ie trying to print a pointer
printf("%f", &thing) <- wrong, &thing is a pointer
instead
printf("%f", thing)
oh
scanf takes pointers, printf doesn't
(unless you're actually trying to print a pointer, lol)
!solved
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity