+ 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 Answers
+ 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 ?