-
Notifications
You must be signed in to change notification settings - Fork 0
/
Day_1.java
22 lines (15 loc) · 827 Bytes
/
Day_1.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Declare second integer, double, and String variables. */
int secondInteger=0;
double secondDouble=0.0;
String secondString=null;
/* Read and save an integer, double, and String to your variables.*/
secondInteger =Integer.parseInt(scan.nextLine());
secondDouble = Double.parseDouble(scan.nextLine());
secondString = scan.nextLine();
/* Print the sum of both integer variables on a new line. */
System.out.println(i+secondInteger);
System.out.println(d+secondDouble);
System.out.println(s+secondString);
/* Print the sum of the double variables on a new line. */
/* Concatenate and print the String variables on a new line;
the 's' variable above should be printed first. */