Using code playground, can someone tell me if the output for this code is normal or is something wrong with my code. It doesn't let me input velocity or time after I run it, is that normal for code playground? Total newbie to here. Just a simple code to calculate distance. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Using code playground, can someone tell me if the output for this code is normal or is something wrong with my code. It doesn't let me input velocity or time after I run it, is that normal for code playground? Total newbie to here. Just a simple code to calculate distance.

#include <iostream> using namespace std; int main() { int velocity, time, distance; cout << "Enter velocity: "; cin >> velocity; cout << "Enter time: "; cin >> time; distance: velocity * time; cout << distance; cout << "m"; return 0; }

1st Oct 2016, 10:07 PM
Rushawn
2 ответов
+ 1
distance= velocity * time; then it works.
1st Oct 2016, 11:55 PM
marcram
0
lol omg how did I miss something so simple. thank you!
1st Oct 2016, 11:59 PM
Rushawn