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


10/1/2016 10:07:04 PM


2 Answers

New Answer


distance= velocity * time; then it works.


lol omg how did I miss something so simple. thank you!