Repository navigation
Expand file tree
/
Copy pathTaskTwentyfive.java
More file actions
52 lines (37 loc) · 1.5 KB
/
Copy pathTaskTwentyfive.java
File metadata and controls
52 lines (37 loc) · 1.5 KB
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
43
44
45
46
47
48
49
50
51
52
import java.util.Scanner;
public class TaskTwentyfive{
public static void main(String[] agrs){
Scanner userInput = new Scanner(System.in);
<<<<<<< HEAD
System.out.print("Enter three input integer: ");
int inputInteger = userInput.nextInt();
int integerDivision1 = inputInteger / 100;
double integerDivision2 = inputInteger % 10;
if (integerDivision1 == integerDivision2){
System.out.println(inputInteger);
System.out.println("it is palindrome");
}
else
System.out.println("it is not palindrome");
}
=======
System.out.print("Enter the first rice weight: ");
int weightInput1 = userInput.nextInt();
System.out.print("Enter the first rice price: ");
int priceInput1 = userInput.nextInt();
System.out.print("Enter the second rice weight: ");
int weightInput2 = userInput.nextInt();
System.out.print("Enter the second rice price: ");
int priceInput2 = userInput.nextInt();
if (weightInput1 > weightInput2){
System.out.print("First rice is better price\n");
}
else if (weightInput2 > weightInput1){
System.out.print("Second rice is better price\n");
}
else if (weightInput2 == weightInput1){
System.out.print("They are both better price\n");
}
}
>>>>>>> 23f4b40 (Initial commit)
}