-
Notifications
You must be signed in to change notification settings - Fork 0
/
src_HelloWorld.java
30 lines (25 loc) · 932 Bytes
/
src_HelloWorld.java
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
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
String place = "Europe";
int day = 5;
int flight = 5000;
int transportation = 65 * day;
int kosherfood = 100;
int data = 50 * day;
if (place == "Europe") {
flight = 6500;
kosherfood = 100;
transportation = 70 * day;
} else if (place == "Isreal") {
flight = 5000;
kosherfood = 50;
}
int total = flight + kosherfood + data + transportation;
System.out.println("Your Vacation Cost is " + total);
double pounds = 1000;
double conversionRate = 0.75;
double dollars = pounds * conversionRate;
System.out.println("You had " + pounds + " pounds which is " + dollars + " dollars because of the conversion rate of " + conversionRate);
}
}