Skip to content

Commit a1e1778

Browse files
author
Hud
committed
GITA MASALA
1 parent b4bc421 commit a1e1778

24 files changed

+404
-53
lines changed
-1.52 KB
Binary file not shown.
-2.46 KB
Binary file not shown.
-2.09 KB
Binary file not shown.
-52 Bytes
Binary file not shown.

src/fori/carNumber.java

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
package fori;
2+
public class carNumber {
3+
public static void main(String[] args) {
4+
tashkentNumbers("01 X B0B XX", 8.5);
5+
}
6+
7+
8+
// 01 A 001 AA
9+
// 01 A 002 AA
10+
// 01 A 999 AA
11+
// 01 A 000 AB
12+
// 01 A 000 BA
13+
// 01 A 999 ZZ
14+
// 01 B 000 AA
15+
// 01 Z 999 ZZ
16+
// 02 A 000 AA
17+
18+
public static void tashkentNumbers(String pattern, double cost) {
19+
// 01 A 010 AA
20+
// 10*26*10*10*10*26*26
21+
// 1.1 - 000 ... 009
22+
// 1.2 - 000 ... 090
23+
// 1.3 - 000 ... 900
24+
// 2 - oxirgi harf A..Z
25+
// 3 - oxirgidan oldingisi harf A..Z
26+
// 4 - dastlabki harf A..Z
27+
// 5 - 01 .. 09
28+
29+
int counter = 0;
30+
// 01 A B0B AA 8 mln
31+
// 25*10 * 8 mln
32+
33+
// 01 A 101 AA // 8 mln
34+
for (int i = 1; i <= 9; i++) {
35+
for (char j = 'A'; j <= 'Z'; j++) {//4-si
36+
for (char k = 'A'; k <= 'Z'; k++) {//3-si
37+
for (char l = 'A'; l <= 'Z'; l++) { // 2-si
38+
for (int m = 0; m <= 9; m++) { //1- 000 999
39+
for (int n = 0; n <= 9; n++) {
40+
for (int o = 0; o <= 9; o++) {
41+
// 01 A 000 AA
42+
// 0%d %c %d%d%d %c%c
43+
// System.out.printf("");
44+
// 0i j mno kl
45+
46+
if (i == 1 && m == o && j == k && k == l && n == 0) {
47+
System.out.println("0" + i + " " + j + " " + m + "" + n + "" + o + " " + k + "" + l);
48+
counter++;
49+
}
50+
51+
}
52+
}
53+
}
54+
}
55+
}
56+
}
57+
}
58+
System.out.println(counter*cost+" mln");
59+
}
60+
}
61+

src/fori/for10.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package fori;
2+
3+
import java.util.Scanner;
4+
5+
public class for10 {
6+
public static void main(String[] args) {
7+
Scanner scanner = new Scanner(System.in);
8+
9+
System.out.print("n=");
10+
int n = scanner.nextInt();
11+
double sum = 0;
12+
for (int i = 1; i <= n; i++)
13+
sum += 1 / (double)i;
14+
System.out.print("Sum=" + sum);
15+
16+
17+
}
18+
}

src/fori/for11.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package fori;
2+
3+
import java.util.Scanner;
4+
5+
public class for11 {
6+
public static void main(String[] args) {
7+
Scanner scanner = new Scanner(System.in);
8+
9+
System.out.print("n=");
10+
int n = scanner.nextInt();
11+
12+
double result = 0;
13+
for (int i = 0; i <= n; i++)
14+
result += Math.pow(n + i, 2);
15+
System.out.print("Natija=" + result);
16+
17+
}
18+
}

src/fori/for12.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package fori;
2+
3+
import java.util.Scanner;
4+
5+
public class for12 {
6+
public static void main(String[] args) {
7+
Scanner scanner = new Scanner(System.in);
8+
9+
double p = 1;
10+
System.out.print("N=");
11+
int n = scanner.nextInt();
12+
13+
for (int i = 1; i <= n; i++){
14+
p = p * (1 + 0.1 * i);
15+
}
16+
System.out.println("Natija=" + p);
17+
18+
}
19+
}

src/fori/for13.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package fori;
2+
3+
import java.util.Scanner;
4+
5+
public class for13 {
6+
public static void main(String[] args) {
7+
Scanner scanner = new Scanner(System.in);
8+
9+
System.out.print("n=");
10+
int n = scanner.nextInt();
11+
12+
double rez=0;
13+
for (int i =1; i<=n; i++)
14+
rez += Math.pow(-1,i+1)*(1.0+(double)i/10);
15+
16+
System.out.print("Yig`indi:" + rez);
17+
}
18+
}

src/fori/for14.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package fori;
2+
3+
import java.util.Scanner;
4+
5+
public class for14 {
6+
public static void main(String[] args) {
7+
Scanner scanner =new Scanner(System.in);
8+
int n;
9+
System.out.print("N:");
10+
n = scanner.nextInt();
11+
12+
int count = 0;
13+
int i;
14+
for (i = 1; i <= (2 * n - 1); i += 2)
15+
{
16+
count += i;
17+
System.out.println(count);
18+
19+
}
20+
21+
}
22+
}

0 commit comments

Comments
 (0)