-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIf17.java
More file actions
28 lines (26 loc) · 755 Bytes
/
If17.java
File metadata and controls
28 lines (26 loc) · 755 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
package ifdirect;
import java.util.Scanner;
public class If17 {
public static void main(String[] args) {
Scanner scanner=new Scanner (System.in);
int a,b,c;
System.out.print ("a=");
a=scanner.nextInt ();
System.out.print ("b=");
b=scanner.nextInt ();
System.out.print ("c=");
c=scanner.nextInt ();
if ( (a-b<0 && b-c<0) || (a-b>0 && b-c>0 )){
a+=2;
b+=2;
c+=2;
System.out.println (a);
System.out.println (b);
System.out.println (c);
}else {
System.out.println ((a - a - a));
System.out.println ((b - b - b));
System.out.println ((c - c - c));
}
}
}