c - Loop while double not equal character? -
I'm not sure how to execute it ...
double fahrenheit; Fahrenheit = 0; While (Fahrenheit! = "Q") I'm going to use scanf to get the value of Fahrenheit. Fahrenheit is double and Q is a character, so obviously it is not really like ... Can anyone tell me how it works?
This is for me, but I'm really in the early stages of learning about C or just programming in general. This is a simple practice in our book and I have not yet learned all those things, in fact, if they are input q, nothing happens. If they input anything but q, what happens to something like 1 + 1 = 2 kind of simple formula for me is absolutely fair for me?
scanf () shown below 0 when you pass the character When you enter q , the loop will expire
double fahrenheit; While (scanf ("% lf", & amp; fahrenheit) == 1) {// your stuff} Other
- Read in Input < Input
q - to check if code> fgets ()
- using
strcmp ()q, then usestrtod ()to change the string again and assign that value to that variable.
Comments
Post a Comment