-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDay05_prob1.java
More file actions
42 lines (28 loc) · 865 Bytes
/
Day05_prob1.java
File metadata and controls
42 lines (28 loc) · 865 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
42
/*
Write a java program that performs the following steps. a. Declare two int variables named x and y. b. Assign input taken from user to x. c. Assign twice the value of x to y. d. Interchange the value of x and y. e. Print the values of both variables on screen.
Input Format
a positive integer value
Constraints
a positive integer value
Output Format
display 2 integers as per instructions on the screen
Sample Input 0
5
Sample Output 0
10 5
Sample Input 1
10
Sample Output 1
20 10
*/
// kirtan jain
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(2*n+" "+n);
}
}