Skip to content

Commit aa6f7dd

Browse files
author
Hud
committed
GITA MASALA
1 parent f6d5a8d commit aa6f7dd

File tree

274 files changed

+2556
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+2556
-1
lines changed

.idea/libraries/KotlinJavaRuntime.xml

+26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GitaProjects.iml

+1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<SOURCES />
1818
</library>
1919
</orderEntry>
20+
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
2021
</component>
2122
</module>
609 Bytes
Binary file not shown.
1.21 KB
Binary file not shown.
1.13 KB
Binary file not shown.
701 Bytes
Binary file not shown.
1.48 KB
Binary file not shown.
867 Bytes
Binary file not shown.
915 Bytes
Binary file not shown.
240 Bytes
Binary file not shown.
1.46 KB
Binary file not shown.
355 Bytes
Binary file not shown.
1.15 KB
Binary file not shown.
772 Bytes
Binary file not shown.
22.8 KB
Binary file not shown.
14.9 KB
Binary file not shown.
19 KB
Binary file not shown.

out/production/GitaProjects/array.zip

9.48 KB
Binary file not shown.
1.26 KB
Binary file not shown.
Binary file not shown.
258 Bytes
Binary file not shown.
1.25 KB
Binary file not shown.
1.32 KB
Binary file not shown.
1.27 KB
Binary file not shown.
790 Bytes
Binary file not shown.
771 Bytes
Binary file not shown.
738 Bytes
Binary file not shown.
1.37 KB
Binary file not shown.
1.4 KB
Binary file not shown.
785 Bytes
Binary file not shown.
835 Bytes
Binary file not shown.
837 Bytes
Binary file not shown.
914 Bytes
Binary file not shown.
1.36 KB
Binary file not shown.
863 Bytes
Binary file not shown.
799 Bytes
Binary file not shown.
827 Bytes
Binary file not shown.
800 Bytes
Binary file not shown.
783 Bytes
Binary file not shown.
641 Bytes
Binary file not shown.
1.28 KB
Binary file not shown.
1.25 KB
Binary file not shown.
828 Bytes
Binary file not shown.
780 Bytes
Binary file not shown.
875 Bytes
Binary file not shown.
865 Bytes
Binary file not shown.
892 Bytes
Binary file not shown.
875 Bytes
Binary file not shown.
806 Bytes
Binary file not shown.
258 Bytes
Binary file not shown.
690 Bytes
Binary file not shown.
871 Bytes
Binary file not shown.
907 Bytes
Binary file not shown.
1.01 KB
Binary file not shown.
690 Bytes
Binary file not shown.
1.24 KB
Binary file not shown.
258 Bytes
Binary file not shown.
1.05 KB
Binary file not shown.
1.51 KB
Binary file not shown.
1009 Bytes
Binary file not shown.
1.28 KB
Binary file not shown.
1.29 KB
Binary file not shown.
797 Bytes
Binary file not shown.
745 Bytes
Binary file not shown.
745 Bytes
Binary file not shown.
762 Bytes
Binary file not shown.
1.29 KB
Binary file not shown.
1.29 KB
Binary file not shown.
1.32 KB
Binary file not shown.
1.37 KB
Binary file not shown.
700 Bytes
Binary file not shown.
1.14 KB
Binary file not shown.
1.19 KB
Binary file not shown.
1.18 KB
Binary file not shown.
Binary file not shown.
21.4 KB
Binary file not shown.
1.23 KB
Binary file not shown.

out/production/GitaProjects/fun.zip

5.52 KB
Binary file not shown.
793 Bytes
Binary file not shown.
1.22 KB
Binary file not shown.
990 Bytes
Binary file not shown.
1.34 KB
Binary file not shown.
1.43 KB
Binary file not shown.
705 Bytes
Binary file not shown.
1.14 KB
Binary file not shown.
709 Bytes
Binary file not shown.
1.16 KB
Binary file not shown.
875 Bytes
Binary file not shown.
923 Bytes
Binary file not shown.
1.48 KB
Binary file not shown.
964 Bytes
Binary file not shown.
835 Bytes
Binary file not shown.
1.35 KB
Binary file not shown.
883 Bytes
Binary file not shown.
703 Bytes
Binary file not shown.
795 Bytes
Binary file not shown.
695 Bytes
Binary file not shown.
764 Bytes
Binary file not shown.
745 Bytes
Binary file not shown.
745 Bytes
Binary file not shown.
1.47 KB
Binary file not shown.
366 Bytes
Binary file not shown.
806 Bytes
Binary file not shown.
821 Bytes
Binary file not shown.
805 Bytes
Binary file not shown.
695 Bytes
Binary file not shown.
695 Bytes
Binary file not shown.
840 Bytes
Binary file not shown.
725 Bytes
Binary file not shown.
897 Bytes
Binary file not shown.
1.1 KB
Binary file not shown.
1.02 KB
Binary file not shown.
843 Bytes
Binary file not shown.
1.03 KB
Binary file not shown.
1.03 KB
Binary file not shown.
1.31 KB
Binary file not shown.
771 Bytes
Binary file not shown.
1.07 KB
Binary file not shown.
1.02 KB
Binary file not shown.
1.62 KB
Binary file not shown.
1.14 KB
Binary file not shown.
1.18 KB
Binary file not shown.
1.3 KB
Binary file not shown.
883 Bytes
Binary file not shown.
954 Bytes
Binary file not shown.
810 Bytes
Binary file not shown.
1.68 KB
Binary file not shown.
2.11 KB
Binary file not shown.
2.28 KB
Binary file not shown.
985 Bytes
Binary file not shown.
904 Bytes
Binary file not shown.
1.36 KB
Binary file not shown.
1.56 KB
Binary file not shown.
1.16 KB
Binary file not shown.
1.96 KB
Binary file not shown.
737 Bytes
Binary file not shown.
780 Bytes
Binary file not shown.
779 Bytes
Binary file not shown.
21.3 KB
Binary file not shown.
12.4 KB
Binary file not shown.
827 Bytes
Binary file not shown.
1008 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.02 KB
Binary file not shown.
1.08 KB
Binary file not shown.
1.03 KB
Binary file not shown.
421 Bytes
Binary file not shown.
749 Bytes
Binary file not shown.
Binary file not shown.
2.12 KB
Binary file not shown.
955 Bytes
Binary file not shown.
971 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
720 Bytes
Binary file not shown.
1.25 KB
Binary file not shown.

out/production/GitaProjects/java.c++

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include <stdio.h>
2+
3+
int main(void)
4+
{
5+
int a[11];
6+
int n;
7+
8+
printf("N: ");
9+
scanf("%i",&n);
10+
11+
int i;
12+
for (i=0; i<n; ++i){
13+
printf("a[%i] : ",i+1);
14+
scanf("%i",&a[i]);
15+
}
16+
17+
int num=1;
18+
19+
for (i=1;i<n;++i){
20+
if (a[i-1]!=a[i]){
21+
++num;
22+
}
23+
}
24+
printf("%i\n",num);
25+
return 0;
26+
}
13.2 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
242 Bytes
Binary file not shown.
257 Bytes
Binary file not shown.
Binary file not shown.

src/Example.java

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
public class Example {
2+
public static void main(String[] args) {
3+
int n = 1634;
4+
int temp = n;
5+
int m = 0;
6+
7+
// berilgan sonni uzunligini topish
8+
for (; temp != 0; temp = temp / 10) {
9+
System.out.println(m);
10+
11+
12+
}
13+
14+
15+
}
16+
17+
18+
}
19+
20+
21+

src/Function (2).zip

22.8 KB
Binary file not shown.

src/array (2).zip

14.9 KB
Binary file not shown.

src/array (3).zip

19 KB
Binary file not shown.

src/array.zip

9.48 KB
Binary file not shown.

src/array/Array10.java

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package array;
2+
3+
public class Array10 {
4+
5+
public static void main(String[] args) {
6+
// int[] arr = new int[10];
7+
int[] arr = {10, 13, 26, 21, 19, 1, 2, 8, 14, 19};
8+
solution(arr);
9+
}
10+
11+
// 10 13 26 21 19 1 2 8 14 19
12+
// 10 26 2 8 14 19 1 19 21 13
13+
public static void solution(int[] array) {
14+
// faqat juftlari. Indexlari o'sish tartibida
15+
for (int i = 0; i < array.length; i++) {
16+
if (array[i] % 2 == 0) System.out.print(array[i] + "\t");
17+
}
18+
19+
// faqat taqlari. Indexlari kamayish tartibida
20+
for (int i = array.length - 1; i >= 0; i--) {
21+
if (array[i] % 2 == 1)
22+
System.out.print(array[i] + "\t");
23+
}
24+
25+
}
26+
}

src/array/Array11.java

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package array;
2+
3+
public class Array11 {
4+
public static void main(String[] args) {
5+
array11(3,new int[]{2,4,5,6,7,8,10,11,13,14,15,16,198,172
6+
});
7+
}
8+
9+
public static void array11(int k, int[] array) {
10+
11+
for (int i = k-1; i < array.length; i += k) {
12+
System.out.print(array[i]+"\t");
13+
}
14+
}
15+
}
16+
17+
18+

src/array/Array12.java

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package array;
2+
3+
/**
4+
* Project Admin -> Husanboy Azamov
5+
* Package Name -> array
6+
* Class Date -> 6/22/2022/ 12:55 AM
7+
*/
8+
public class Array12 {
9+
10+
}

src/array/Array15.java

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package array;
2+
3+
/**
4+
* Project Admin -> Husanboy Azamov
5+
* Package Name -> array
6+
* Class Date -> 6/22/2022/ 1:24 AM
7+
*/
8+
public class Array15 {
9+
public static void main(String[] args) {
10+
int [] r={1,2,3,4,5,6,7,8};
11+
array15(r);
12+
}
13+
public static void array15(int[] array){
14+
for (int i = 1; i < array.length; i+=2) {
15+
System.out.print(array[i]+" ");
16+
17+
}
18+
System.out.println();
19+
for (int i = array.length-2; i >=0 ; i-=2) {
20+
System.out.print(array[i]+" ");
21+
}
22+
23+
}
24+
}

src/array/Array16.java

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package array;
2+
3+
/**
4+
* Project Admin -> Husanboy Azamov
5+
* Package Name -> array
6+
* Class Date -> 6/22/2022/ 1:40 AM
7+
*/
8+
public class Array16 {
9+
public static void main(String[] args) {
10+
int[] r = {1, 2, 3, 4, 5, 6, 7, 8, 9};//9/2 4 -> 5
11+
int[] r1 = {3, 21, 13, 14, 52, 67, 79, 18, 90};//9/2 4 -> 5
12+
//index 0 1 2 3 4 5 6 7 8
13+
array16(r);
14+
array16(r1);
15+
}
16+
17+
public static void array16(int[] array) {
18+
for (int i = 0; i < array.length / 2; i++) {//4 -> 5
19+
//9/2 =4.5
20+
System.out.print(array[i] + " ");// i0-1;i1-2;i2-3;i3-4;
21+
System.out.print(array[array.length - i - 1] + " ");//i8-9:i7-8:i6-7: i5-6;
22+
}
23+
if (array.length % 2 != 0) { //true
24+
System.out.println(array[array.length / 2]);//i4-5;
25+
}
26+
27+
}
28+
}

src/array/Array17.java

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package array;
2+
3+
/**
4+
* Project Admin -> Husanboy Azamov
5+
* Package Name -> array
6+
* Class Date -> 6/22/2022/ 2:05 PM
7+
*/
8+
public class Array17 {
9+
public static void main(String[] args) {
10+
11+
solution(new int[]{1, 2, 3,4,5});
12+
System.out.println();
13+
}
14+
15+
public static void solution(int[] array) {//5
16+
for (int i = 0; i < array.length / 2 + 1; i += 2) {//3
17+
System.out.print(array[i] + " ");//i0 =1;i2=3;
18+
if (array.length / 2 > i) {//i=0;arleng=2;true;i=2;false
19+
System.out.print(array[i + 1] + " ");//i+1=i1;
20+
}
21+
if (array.length - i - 1 > array.length / 2) {//true;false
22+
System.out.print(array[array.length - i - 1] + " ");//i4=5;
23+
}
24+
if (array.length - i - 2 > array.length / 2) {//true;false
25+
System.out.print(array[array.length - i - 2] + " ");//i3=4;
26+
//
27+
}
28+
}
29+
}
30+
}

src/array/Array18.java

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package array;
2+
3+
/**
4+
* Project Admin -> Husanboy Azamov
5+
* Package Name -> array
6+
* Class Name -> Array18
7+
* Copyright © : 6/23/2022
8+
*/
9+
public class Array18 {
10+
public static void main(String[] args) {
11+
int[] array = {3, 5, 1, 4, 2, 3, 1, 6, 5, 1};
12+
System.out.println(solution(array));
13+
}
14+
15+
// eng oxirgi elementidan kichik birinchi element topilsin
16+
// 3 5 1 4 2 3 1 6 5 3 -> 1
17+
public static int solution(int[] array) {
18+
int last = array[array.length - 1];
19+
for (int i = 0; i < array.length - 1; i++) {
20+
if (array[i] < last) {// topildi
21+
return array[i];
22+
}
23+
}
24+
return 0;
25+
}
26+
}

src/array/Array19.java

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package array;
2+
3+
import java.util.Arrays;
4+
5+
/**
6+
* Project Admin -> Husanboy Azamov
7+
* Package Name -> array
8+
* Class Name -> Array19
9+
* Copyright © : 6/23/2022
10+
*/
11+
public class Array19 {
12+
public static void main(String[] args) {
13+
14+
arraySample(new int[]{10,2,4,5,6,78,11,88});
15+
}
16+
17+
public static void arraySample(int[] array) {
18+
int k = array.length - 1;
19+
while ((array[0] >= array[k]) || (array[k] >= array[array.length - 1]) && (k > 0)) {
20+
--k;
21+
}
22+
if (k == 0) System.out.println(k);
23+
else{
24+
System.out.println(array[k]);
25+
} }
26+
}

src/array/Array1A.java

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package array;
2+
3+
//import array.util.ArrayUtil;
4+
5+
import java.util.Scanner;
6+
7+
public class Array1A {
8+
public static void main(String[] args) {
9+
Scanner scanner = new Scanner(System.in);
10+
int n = scanner.nextInt();
11+
int[] arr = new int[n];
12+
13+
for (int i = 0; i < n; i++) {
14+
// 0 - 1
15+
// 1 - 3
16+
// 2 - 5
17+
// 3 - 7
18+
// 4 - 9
19+
// 5 - 11
20+
arr[i] = i * 2 + 1; // 1 3 5 7 9 11 13 ...
21+
}
22+
// ArrayUtil.show(arr);
23+
}
24+
25+
}

src/array/Array1B.java

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package array;
2+
3+
import java.util.Scanner;
4+
5+
public class Array1B {
6+
public static void main(String[] args) {
7+
Scanner scanner = new Scanner(System.in);
8+
int n = scanner.nextInt();
9+
solution(n);
10+
}
11+
12+
public static void solution(int n) {
13+
int[] arr = new int[n];
14+
15+
for (int i = 0; i < n; i++) {
16+
// 0 - 1
17+
// 1 - 3
18+
// 2 - 5
19+
// 3 - 7
20+
// 4 - 9
21+
// 5 - 11
22+
arr[i] = i * 2 + 1; // 1 3 5 7 9 11 13 ...
23+
}
24+
25+
for (int i = 0; i < n; i++) {
26+
System.out.print(arr[i] + "\t");
27+
}
28+
}
29+
}

src/array/Array2.java

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package array;
2+
3+
import java.util.Scanner;
4+
5+
public class Array2 {
6+
public static void main(String[] args) {
7+
Scanner scanner = new Scanner(System.in);
8+
int n = scanner.nextInt();
9+
solution(n);
10+
}
11+
12+
public static void solution(int n) {
13+
int[] arr = new int[n];
14+
int daraja = 1;
15+
for (int i = 0; i < n; i++) {
16+
arr[i] = daraja; // 1 2 4 8 16 32 64 ...
17+
daraja *= 2;
18+
}
19+
20+
for (int i = 0; i < n; i++) {
21+
System.out.print(arr[i] + "\t");
22+
}
23+
}
24+
}

src/array/Array20.java

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package array;
2+
3+
/**
4+
* Project Admin -> Husanboy Azamov
5+
* Package Name -> array
6+
* Class Name -> Array20
7+
* Copyright © : 6/23/2022
8+
*/
9+
public class Array20 {
10+
public static void main(String[] args) {
11+
12+
array20(2,4,new int[]{1,2,3,4,5,6,7,8});//3+4+5 =12
13+
}
14+
15+
public static void array20(int k, int l, int[] array) {
16+
int sum=0;
17+
for (int i = k; i <=l ; i++) {
18+
sum+=array[i];
19+
}
20+
System.out.println(sum);
21+
}
22+
}

0 commit comments

Comments
 (0)