Count station and price C++

Раздел
Программирование
Предмет
Просмотров
382
Покупок
0
Антиплагиат
Не указан
Размещена
26 Мая 2021 в 11:46
ВУЗ
Не указан
Курс
Не указан
Стоимость
100 ₽
Демо-файлы   
1
png
Снимок
1.3 Кбайт
Файлы работы   
1
Каждая работа проверяется на плагиат, на момент публикации уникальность составляет не менее 40% по системе проверки eTXT.
zip
Station
8.9 Мбайт 100 ₽
Описание

The program accepts two inputs, namely: a train station number indicating where the passenger will board the train, a second train station number indicating where the passenger will get off from the train. Train stations are numbered consecutively from 1 to 100. The train fare is computed based on the number of stations that the passenger will pass through. Included in the counting are the stations where he/she boarded and the station where he/she got off. For example, if the passenger boarded at station 51 and got off at station 85, then the passengers passed through a total of 35 stations. A fixed fare of 30.00 Pesos should be paid by the passenger for the first 20 stations. An additional 1.25 Pesos is charged for every additional station. The program should output the the count or number of stations passed through by the passenger and the train fare.

Вам подходит эта работа?
Другие работы автора
Темы журнала
Показать ещё
Прямой эфир