Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/coffeeMachine/CoffeMachine.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import java.util.Scanner;

public class CoffeMachine {
public static void main(String[] args) {
System.out.println("Write how many cups of coffee you will need:");
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is better to name your variable more descriptive rather than a.

System.out.println("For" + " " + a + " " + "cups of coffee you will need:");
System.out.println(a * 200 + " " + "ml of water");
System.out.println(a * 50 + " " + "ml of milk");
System.out.println(a * 15 + " " + "g of coffee beans");
}
}