# Problem 1 - Budget

Nov 10th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. using System;
2. using System.Collections.Generic;
3. using System.Linq;
4. using System.Text;
6.
7. class Problem1
8. {
9.     static void Main()
10.     {
14.
15.         int normalWeekends = 4 - hometownWeekends;
16.         int normalWeekendDaysExpenses = normalWeekends * 2 * 20;
17.         int goingOutExpenses = weekDaysOut * ((int)(0.03 * amountOfMoneyAvailable) + 10);
18.         int normalWeekDays = 22 - weekDaysOut;
19.         int normalWeekDaysExpenses = normalWeekDays * 10;
20.
21.         int moneyLeft = amountOfMoneyAvailable - normalWeekendDaysExpenses - goingOutExpenses - normalWeekDaysExpenses - 150;
22.
23.         if (moneyLeft == 0)
24.         {
25.             Console.WriteLine("Exact Budget.");
26.         }
27.         if (moneyLeft > 0)
28.         {
29.             Console.WriteLine("Yes, leftover {0}.", moneyLeft);
30.         }
31.         if (moneyLeft < 0)
32.         {
33.             Console.WriteLine("No, not enough {0}.", Math.Abs(moneyLeft));
34.         }
35.     }
36. }