Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Savings
- {
- class Program
- {
- static void Main(string[] args)
- {
- double salary = double.Parse(Console.ReadLine());
- int months = int.Parse(Console.ReadLine());
- double minimalCosts = double.Parse(Console.ReadLine());
- double monthlySavings = salary * 0.70 - minimalCosts;
- Console.WriteLine($"She can save {monthlySavings / salary * 100:f2}%\n{monthlySavings * months:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement