I need ahelpness | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I need ahelpness

I wrote this code ..is there anything wrong The compiler run it and all the causes true I can't go to the next lesson if I don't solve it! include <iostream> using namespace std; int main() { //your code goes here float bodyTemp=0.0; cin>>bodyTemp; if (bodyTemp >=36.1&& bodyTemp<=36.9){ cout <<"ok"<<endl; } else { cout << "Not ok"<<endl; } return 0; }

24th Apr 2022, 1:54 PM
Doaa Khalid
Doaa Khalid - avatar
10 Answers
+ 5
Doaa Khalid Check description again There is 'OK' not 'ok' if (bodyTemp >= 36.1 && bodyTemp <= 36.9) cout << "OK"; else cout << "Not OK";
24th Apr 2022, 2:02 PM
A͢J
A͢J - avatar
+ 4
Doaa Khalid #include <iostream> using namespace std; int main() { float temp; cin >> temp; if (temp > 36.1 && temp <36.9) {cout << "OK";} else {cout << "Not OK";} return 0; }
24th Apr 2022, 2:32 PM
BroFar
BroFar - avatar
+ 2
Doaa Khalid please read the instructions closely. Write a program that takes body temperature in Celsius as input. If it is in range from 36.1 to 36.9 print "OK", otherwise print “Not OK”.
24th Apr 2022, 2:06 PM
BroFar
BroFar - avatar
+ 1
Yes ..thank you very much ..for told me this
24th Apr 2022, 2:23 PM
Doaa Khalid
Doaa Khalid - avatar
+ 1
Brofar
24th Apr 2022, 2:25 PM
Doaa Khalid
Doaa Khalid - avatar
+ 1
BroFar I do this... the code is correct So I think there is a problem at sololearn
24th Apr 2022, 2:44 PM
Doaa Khalid
Doaa Khalid - avatar
0
I check the description again ...l do that many times I think there is a problem in the running of the code
24th Apr 2022, 2:22 PM
Doaa Khalid
Doaa Khalid - avatar
0
Thanks for the advice..I will use it next time
24th Apr 2022, 2:27 PM
Doaa Khalid
Doaa Khalid - avatar
0
Thanks guys I solve the code and complete to learning.. The wrong is the method of words writing like OK and ok they aren't the same
27th Apr 2022, 12:08 PM
Doaa Khalid
Doaa Khalid - avatar
- 1
Bbj
26th Apr 2022, 7:40 AM
Test account
Test account - avatar