-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathif10.java
More file actions
23 lines (21 loc) · 548 Bytes
/
if10.java
File metadata and controls
23 lines (21 loc) · 548 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package ifdirect;
import java.util.Scanner;
public class if10 {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
System.out.println("A:");
int a= scanner.nextInt();
System.out.println("b:");
int b= scanner.nextInt();
boolean booleans =a==b;
if (booleans){
int c=a+b;
a=c;
b=c;
System.out.println(""+a);
System.out.println(b);
}else {
System.out.println();
}
}
}