Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _09_Converter
- {
- class Program
- {
- static void Main(string[] args)
- {
- int milesPerGalon = int.Parse(Console.ReadLine());
- if (1 <= milesPerGalon && milesPerGalon <= 100)
- {
- double km = (milesPerGalon * 1.0);
- double perHundred = Math.Floor(282.48 / km);
- Console.WriteLine($"{perHundred} litres per 100 km");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement