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;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Dollar(int dollars, double worth)
- {
- double precent, sum1;
- sum1 = dollars * worth;
- int dollarstart = dollars;
- for (int i = 1; i <= 10; i++)
- {
- Console.WriteLine("Enter the precentage of dollar's change today: (1% - 100%)");
- precent = double.Parse(Console.ReadLine());
- precent = precent / 100;
- worth = worth * precent;
- }
- Console.Write("Paar: " + Math.Abs(worth * dollars - sum1));
- }
- static void Main(string[] args)
- {
- Console.WriteLine("Enter the worth of dollars you've purchased:");
- double dollarsworth = double.Parse(Console.ReadLine());
- Console.WriteLine("Enter the ammount of dollars:");
- int dollars = int.Parse(Console.ReadLine());
- Dollar(dollars, dollarsworth);
- Console.ReadLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment