//// Scott Wardd X337 Penny////

import java.text.DecimalFormat;
	import java.util.Scanner;
	
	
public class X337 Penny
{
	public static void main(String[] args)
	
	{
	//1.Create the decial format for money
	DecimalFormat dollar = new DecimalFormat("#,##0.00");

	//2.Create the necessary variables
	double money = 0.01;
	int dayswork = 0;

	//3. Create the scanner
	Scanner entry = new Scanner(System.in);
	
	//3.a Create a welcome screen
	System.out.println("Welcome!");
	System.out.println("This program will tell you the amount of money you will each day if you were to recive a penny the first 2 pennies the second etc...enjoy!");
	
	//4.Prompt the user for input-set input to number of days worked.
	System.out.println("\n\n\nPlease enter the number of days worked?");
	dayswork = entry.nextInt();

	//5. Calculation of problem
	while (dayswork >= 0)
		{
			money = money * 2; //creates the value of money times'in it by 2

			System.out.println("$" + dollar.format(money)); //prints the values over days
			dayswork--; //decrement of numbers of days worked to end loop
		}
		
		
	//6. Ending statements
	System.out.println("The total is $" + dollar.format(money));
	System.out.println("\n\nThank for using my program\nScott Ward\nPage 337\nQuestion 4\n written for Prof Bam.\n");






	}
}