+ 2
Why isn't this code running on SOLOLEARN but its running on another compiler.?
#include <iostream> using namespace std; int main() { const float P=1.23; const float A=2.5; const float C=0.2; float V,F,power,h_power; cout<<"Enter velocity of the car I meters per second.\n"; cin>>V; F=0.5*P*V*V*A*C; power=F*V; h_power=power/746; cout<<"Drag force on the car is " <<F <<" newtons. \n"; cout<<"Power in watts is " <<power ; cout<<"Power in H.P is " <<h_power <<" H.P \n"; return 0; }
4 odpowiedzi
+ 5
**🇦🇪|🇦🇪** you cannot, that's why it's generally a bad idea to copy paste code snippets as it is from internet.
+ 3
Said Ahmad
Because there are some escape character which you can't see
https://code.sololearn.com/csQynUK0vblT/?ref=app
+ 1
Said Ahmad
Always paste code into notepad, then copy from notepad to the destination.
Notepad does not support the weird characters you don't see.
- 1
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ How can I know that by only looking at the code ?