0
[Practice 24.2] Expected primary-expression before ‘<‘ token
Hello, I’m having troubles trying to fix this part of my code, any help would be appreciated :) #include <iostream> using namespace std; int main() { //your code goes here double temp; cin >> temp; if (temp =>36.1 && <=36.9) cout << "Ok"; else cout << "Not OK"; }
5 Respostas
+ 2
"temp >= " instead of 'temp=>" and also it will be "if (temp >=36.1 && temp <= 36.9)"
or you can write it as "if (36.1<=temp<=36.9)" .
+ 1
Abhay Thank you so much! I didn’t know minor changes in spacing and placement could affect the code so much. C++’s tad bit weird but I’ll get used to it
+ 1
Plaush it's not about spacing , you can't do "=>" , it is "<=" .
+ 1
Plaush a typo, ">=" not "<="
0
Abhay Ahh ok :)