-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinteger12.java
More file actions
24 lines (21 loc) · 640 Bytes
/
integer12.java
File metadata and controls
24 lines (21 loc) · 640 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
package integer;
import java.util.Scanner;
public class integer12 {
public static void main(String[] args) {
int yuzlar;
int onlar;
int birlar;
int e;
int f;
Scanner scanner=new Scanner(System.in);
System.out.println("number: ");
int number =scanner.nextInt();
yuzlar = number / 100;
onlar = number - yuzlar * 100;
birlar = onlar / 10;
e = onlar - birlar * 10;
f = yuzlar + 10 * birlar + 100 * e;
System.out.print("uning raqamlarining o'rnini almashtirishdan hosil bo'lgan son -> ");
System.out.print(f);
}
}