Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Aktivitetsdiagram
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter age: ");
- int age = int.Parse(Console.ReadLine());
- int money = 15000;
- do
- {
- if (money > 20000 || age < 60)
- {
- Console.WriteLine("You are saving little");
- money = (money + 500);
- }
- else
- {
- Console.WriteLine("You are saving a lot");
- money = (money + 1000);
- }
- age = (age++);
- }
- while (money < 20000 && age < 65);
- Console.WriteLine("You are retired by the age of " + age);
- Console.WriteLine("You are saved " + money + " dollars.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement