+ 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; }      

13th Nov 2021, 9:46 AM
Said Ahmad
Said Ahmad - avatar
4 Answers
+ 5
**🇩đŸ‡Ș|🇩đŸ‡Ș** you cannot, that's why it's generally a bad idea to copy paste code snippets as it is from internet.
13th Nov 2021, 11:12 AM
Arsenic
Arsenic - avatar
+ 3
Said Ahmad Because there are some escape character which you can't see https://code.sololearn.com/csQynUK0vblT/?ref=app
13th Nov 2021, 9:53 AM
AÍąJ
AÍąJ - avatar
+ 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.
15th Nov 2021, 4:13 AM
l4t3nc1
l4t3nc1 - avatar
- 1
AͱJ - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ How can I know that by only looking at the code ?
13th Nov 2021, 10:35 AM
**🇩đŸ‡Ș|🇩đŸ‡Ș**
**🇩đŸ‡Ș|🇩đŸ‡Ș** - avatar