hi there i have a problem where i cannot find a way to make a java program to Write a program which asks the user how many days he will be working. Then calculate and print the
amount of money he will earn if he is paid £1 for day 1, £3 for day 2, £9 for day 3, etc. trebling the rate
of pay each day.
the problem im having is trebling the pay each day from user input below is where i have got to in my java program after which i have spent hours or even days trying to work out how to get the rest running and ending up with loads of errors please help ive only started using java in the last 2 weeks in uni and this is my third assignment which im finding really complex.

here is were ive got to without any errors:-

import java.util.*;
	class Assignment3{
	    public static void main(String[] args) {
		int days;
        Scanner scanner = new Scanner(System.in);
		System.out.println("How many days will you be working ?");
		days = scanner.nextInt();
7 Years
Discussion Span
Last Post by masijade

Well, of course it can't if you don't have any code for it.

At least make an attempt.

As a hint, save the total amount made today in a variable, then triple that amount into another variable, then add that back into the original variable and repeat the process. A for loop is enough.

Now, make an attempt at it and post that code if it doesn't work.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.