Year 1 Computer Science *HELP*

Question 4

Write an algorithm to help a user count their loose coin change. The program should ask the user to enter the number of £2 coins they have, then the number of £1 coins, then 50p coins, then 20p coins, then 10p coins, then 5p coins, then 2p coins and finally the number of 1p coins. Once each of these inputs has been collected the program should calculate the totalChange (a double) as pounds and pence and print this to the console.

NOTE: Inputs must come from the console so use the Console.getInt(…) method. Also, the result must be printed to the console so use the System.out.println(…) method. The prompts displayed to the user when asking for the inputs MUST exactly match those shown in the sample interaction below. Also, the result printed MUST be in the same format as the sample interaction below. A valid sample interaction would look like this:

£2: 1

£1: 1

50p: 3

20p: 1

10p: 0

5p: 2

2p: 0

1p: 2

Total change is £4.82

“Completely new to software development something i am struggling with, anyone able to assist in this matter”. It would be greatly appreciated. nathan

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if you’re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess I’d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

I will be sure to complete the curriculum

thank you so much