-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLeaning_Day1.java
More file actions
30 lines (25 loc) · 1.09 KB
/
Copy pathLeaning_Day1.java
File metadata and controls
30 lines (25 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Day 1
public class Main
{
public static void main(String[] args)
{
// Input: Define the names of the bank accounts
String bankAccountSparkasseName = "Sparkasse "; // Sparkasse bank account
String bankAccountN26Name = "N26 "; // N26 bank account
// Input: Define the amount of money in each bank account
int bankAccountSparkasseMoney = 2900; // Money in Sparkasse account
int bankAccountN26Money = 99; // Money in N26 account
// Calculate the total money in all accounts
int totalMoney = bankAccountSparkasseMoney + bankAccountN26Money;
// Output: Print the amount of money in each account and the total
System.out.println(
"There are " + bankAccountSparkasseMoney + "€ in the " + bankAccountSparkasseName + "account."
);
System.out.println(
"There are " + bankAccountN26Money + "€ in the " + bankAccountN26Name + "account."
);
System.out.println(
"There are " + totalMoney + "€ in both accounts."
);
}
}