Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp7
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("--- 7. feladat ---");
- Console.WriteLine("Kérem a tank méretét:");
- double tank = double.Parse(Console.ReadLine());
- Console.WriteLine("Kérem az átlagfogyasztást:");
- double atlag = double.Parse(Console.ReadLine());
- double km = tank / atlag * 100;
- Console.WriteLine("A várható hatótáv: " + km + " km.");
- Console.WriteLine("Ez mérföldben: " + (km * 0.62137) + " mi. ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement