ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > Epoka Science Olympiad 2017 - 9th Grade > задача:


2. 51114 - The traveling vehicle

Epoka Science Olympiad 2017 - 9th Grade

Старт: 06.мая.2017 в 10:00:00
Финиш: 06.мая.2017 в 12:30:00
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (1)

Задачи турнира

• 1. 51113 - The Menu
• 2. 51114 - The traveling vehicle
• 3. 51116 - The Star Triangle
• 4. 51115 - Pascal Triangle

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

The traveling vehicle

Question: The distance a vehicle travels can be calculated as follows:
distance = speed * time
Write a program that asks the user for the speed of a vehicle (in miles per hour) and how many hours it has traveled. The program should then use a loop to display the distance the vehicle has traveled for each hour of that time period. Here is an example of the output:

What is the speed of the vehicle in mph? 40
How many hours has it traveled? 3

Hour       Distance Traveled
--------------------------------------------
1                        40
2                        80
3                        120

Input specification: In the first line, program will get two numbers s (speed) and t (time).

Output specification: Print out the amount of distances one after another with a space in between that the vehicle has traveled for each hour.

Sample Input Sample Output
100 3
80 5
100 200 300
80 160 240 320 400



Для отправки решений необходимо выполнить вход.

www.contester.ru