1.02K subscribers
1.77K photos
420 videos
676 files
3.85K links
Download Telegram
1👍1🔥1🥰1👏1
#javob
#gita_12
Java dasturlash tilida

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("n = ");
int n = scanner.nextInt();
int a = scanner.nextInt();
int min, max;
min = max = a;
for (int i = 2; i <= n; i++) {
a = scanner.nextInt();
if (max < a) {
max = a;
}
if (min > a) {
min = a;
}
}
System.out.println(min + " " + max);
}

Telegram | Viktorina bot | Portfolio
👏21👍1🤩1
1👍1🔥1👏1
1👍1🔥1👏1🎉1🤩1
👍1🔥1🥰1
Assalomu aleykum Xurmatli dasturchilar. PROGRAMMERS kanalimizda savol - javob viktorinasini olib borayapmiz. Viktorinamizda berilayotgan savollar va javobllar yuqorida qolib ketganligini hisobga olgan holatda, viktorinamizdagi savol javoblarni @programmersQuiz_bot botiga joylab borayapmiz. Botga a'zo bo'ling. Hali savollar oldida ...

Botdagi Kotlin bobining Integer bo'limiga yangi savollarni va ularni javoblarini qo'shdik.

Viktorina bot

Telegram | Viktorina bot | Portfolio
1👍1👏1
👍1🔥1🥰1🤩1
shaxsiy kompyuter.pdf
422.7 KB
👍31🔥1👏1
#javob_java_boolean_36

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("x1 = ");
int x1 = scanner.nextInt();
System.out.print("y1 = ");
int y1 = scanner.nextInt();
System.out.print("x2 = ");
int x2 = scanner.nextInt();
System.out.print("y2 = ");
int y2 = scanner.nextInt();
boolean ruh = ((x1 == x2) || (y1 == y2));
System.out.println(ruh);
}

Telegram | Viktorina bot | Portfolio
👍1🔥1👏1
1👍1🔥1👏1
This media is not supported in your browser
VIEW IN TELEGRAM
13-sentabr Xalqaro dasturchilar kuni hammaga muborak bo'lsin

Telegram | Viktorina bot | Portfolio
👍11🎉21🔥1🥰1😁1🤩1
#javob_java_boolean_37

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("x1 = ");
int x1 = scanner.nextInt();
System.out.print("y1 = ");
int y1 = scanner.nextInt();
System.out.print("x2 = ");
int x2 = scanner.nextInt();
System.out.print("y2 = ");
int y2 = scanner.nextInt();
double d = Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(x2 - y2, 2));
System.out.println(d < 2);
}

Telegram | Viktorina bot | Portfolio
👍21🔥1🥰1👏1😁1🎉1
1🔥1🥰1
Kompyuter savodxonligi.pdf
4.5 MB
👍21🥰1🤩1
#javob_java_boolean_38

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("x1 = ");
int x1 = scanner.nextInt();
System.out.print("y1 = ");
int y1 = scanner.nextInt();
System.out.print("x2 = ");
int x2 = scanner.nextInt();
System.out.print("y2 = ");
int y2 = scanner.nextInt();
boolean fil = ((Math.abs(x1 - x2)) == (Math.abs(y1 - y2)));
System.out.println(fil);
}

Telegram | Viktorina bot | Portfolio
1👍1🥰1
👍1🥰1😁1🤩1
#savol

#javob
#kotlin
Kotlin dasturlash tilida

fun main() {
val scanner = Scanner(System.in)
print("x = ")
val x = scanner.nextDouble()
print("e1 = ")
val e1 = scanner.nextDouble()
print("e2 = ")
val e2 = scanner.nextDouble()
print("e3 = ")
val e3 = scanner.nextDouble()
println(ExpFun(x, e1))
println(ExpFun(x, e2))
println(ExpFun(x, e3))
}

fun ExpFun(x: Double, e: Double): Double {
var k = 1.0
var p = 1.0
var a = x
var i = 2
while (a / p > e) {
k += a / p
p *= i.toDouble()
a *= x
i++
}
return k
}

Telegram | Viktorina bot | Portfolio
1👍1🥰1👏1
This media is not supported in your browser
VIEW IN TELEGRAM
Iphone 14 ning yaratilishi ... 😅

Telegram | Viktorina bot | Portfolio
👍6😁51🔥1🥰1👏1🤩1
#javob_java_boolean_39

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("x1 = ");
int x1 = scanner.nextInt();
System.out.print("y1 = ");
int y1 = scanner.nextInt();
System.out.print("x2 = ");
int x2 = scanner.nextInt();
System.out.print("y2 = ");
int y2 = scanner.nextInt();
boolean farzin = (((Math.abs(x1 - x2)) == (Math.abs(y1 - y2)))
((x1 == x2) (y1 == y2)));
System.out.println(farzin);
}

Telegram | Viktorina bot | Portfolio
1👍1🔥1👏1
👍1🔥1🥰1🤩1
#savol

#javob
#java
Java dasturlash tilida

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("n = ");
int n = scanner.nextInt();
int[] a = new int[n];
int[] b = new int[n];
System.out.print(n + " ta massiv elementlarini kiriting: ");
for (int i = 0; i <= n - 1; i++) {
a[i] = scanner.nextInt();
}
int t = 0;
boolean bool;
b[0] = a[0];
for (int i = 1; i <= n - 1; i++) {
bool = true;
for (int j = 0; j <= t; j++) {
if (a[i] == b[j]) {
bool = false;
break;
}
}
if (bool) {
b[++t] = a[i];
}
}
System.arraycopy(b, 0, a, 0, t + 1);
for (int i = 0; i <= t; i++) {
System.out.print(a[i] + " ");
}
}

Telegram | Viktorina bot | Portfolio
👍3🔥1👏1😁1