#include <iostream> using std::cout; using std::cin; using std::endl; int main() { int speed; //скорость автомобиля int distance; //растояние int time; //время cout << "Введите скорость автомобиля: " << endl; cin >> speed; cout << "Введите растояние: " << endl; cin >> distance; cout << "Введите время: " << endl; cin >> time; distance = speed * time; speed = distance / time; time = distance / speed; if (speed < 90) cout << "Вы приехали : " << endl; if (speed > 60) cout << "Скорости не достаточно: " << endl; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter