#savol
#javob
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];
for (int i = 0; i < n; i++) {
a[i] = 2 * i + 1;
System.out.print(a[i] + " ");
}
}
Telegram | Viktorina bot | YouTube
#javob
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];
for (int i = 0; i < n; i++) {
a[i] = 2 * i + 1;
System.out.print(a[i] + " ");
}
}
Telegram | Viktorina bot | YouTube
👍1🔥1🎉1
#javob_cpp_boolean_23
#include <iostream>
using namespace std;
int main(){
bool boolean;
int a, b, c, n;
cout << "n = ";
cin >> n;
a = n / 100;
b = (n / 10) % 10;
c = n % 10;
boolean = (a == c);
cout << boolean;
}
Telegram | Viktorina bot | YouTube
#include <iostream>
using namespace std;
int main(){
bool boolean;
int a, b, c, n;
cout << "n = ";
cin >> n;
a = n / 100;
b = (n / 10) % 10;
c = n % 10;
boolean = (a == c);
cout << boolean;
}
Telegram | Viktorina bot | YouTube
❤1🥰1
#savol
#javob
Java dasturlash tilida
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("x = ");
double x = scanner.nextDouble();
System.out.print("y = ");
double y = scanner.nextDouble();
System.out.print("z = ");
double z = scanner.nextDouble();
double min;
min = (x < y) ? x : y;
min = (min < z) ? min : z;
double k = (x + y + z - min) / 2;
if (x < 0 && y < 0 && z < 0) {
if (x == min) {
System.out.print(y + " " + k + " " + z);
} else if (y == min) {
System.out.print(x + " " + k + " " + z);
} else if (z == min) {
System.out.print(x + " " + k + " " + y);
}
} else {
System.out.print(x + " " + y + " " + z);
}
}
Telegram | Viktorina bot | YouTube
#javob
Java dasturlash tilida
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("x = ");
double x = scanner.nextDouble();
System.out.print("y = ");
double y = scanner.nextDouble();
System.out.print("z = ");
double z = scanner.nextDouble();
double min;
min = (x < y) ? x : y;
min = (min < z) ? min : z;
double k = (x + y + z - min) / 2;
if (x < 0 && y < 0 && z < 0) {
if (x == min) {
System.out.print(y + " " + k + " " + z);
} else if (y == min) {
System.out.print(x + " " + k + " " + z);
} else if (z == min) {
System.out.print(x + " " + k + " " + y);
}
} else {
System.out.print(x + " " + y + " " + z);
}
}
Telegram | Viktorina bot | YouTube
🔥2👍1
#savol
#javob
Java dasturlash tilida
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("a = ");
int a = scanner.nextInt();
System.out.print("b = ");
int b = scanner.nextInt();
int kopaytmasi = 1;
for (int i = a; i <= b; i++) {
kopaytmasi *= i;
}
System.out.println(kopaytmasi);
}
Telegram | Viktorina bot | YouTube
#javob
Java dasturlash tilida
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("a = ");
int a = scanner.nextInt();
System.out.print("b = ");
int b = scanner.nextInt();
int kopaytmasi = 1;
for (int i = a; i <= b; i++) {
kopaytmasi *= i;
}
System.out.println(kopaytmasi);
}
Telegram | Viktorina bot | YouTube
👍2🔥1
#javob_cpp_boolean_24
#include <iostream>
#include <math.h>
using namespace std;
int main(){
bool boolean;
double a, b, c, d;
cout << "a = ";
cin >> a;
cout << "b = ";
cin >> b;
cout << "c = ";
cin >> c;
d = sqrt(b * b - 4 * a * c);
boolean = (d > 0 || d == 0);
cout << boolean;
}
Telegram | Viktorina bot | YouTube
#include <iostream>
#include <math.h>
using namespace std;
int main(){
bool boolean;
double a, b, c, d;
cout << "a = ";
cin >> a;
cout << "b = ";
cin >> b;
cout << "c = ";
cin >> c;
d = sqrt(b * b - 4 * a * c);
boolean = (d > 0 || d == 0);
cout << boolean;
}
Telegram | Viktorina bot | YouTube
👍3👏2
#savol
#javob
Java dasturlash tilida
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("a = ");
int a = scanner.nextInt();
System.out.print("b = ");
int b = scanner.nextInt();
for (int i = a; i <= b; i++) {
System.out.print(i + " ");
}
}
Telegram | Viktorina bot | YouTube
#javob
Java dasturlash tilida
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("a = ");
int a = scanner.nextInt();
System.out.print("b = ");
int b = scanner.nextInt();
for (int i = a; i <= b; i++) {
System.out.print(i + " ");
}
}
Telegram | Viktorina bot | YouTube
🤩3👍1
Java dasturlash tilida kichik bir o'yin kodi
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Noma'lum butun sonni kiriting: ");
int n = scanner.nextInt();
int count = 0;
do {
System.out.print((count + 1) + " - urinish son kiriting: ");
int a = scanner.nextInt();
if (a > n) {
System.out.println("Siz noma'lum sondan katta son kiritdingiz");
count++;
}
if (a < n) {
System.out.println("Siz noma'lum sondan kichik son kiritdingiz");
count++;
}
if (a == n) {
System.out.println("Siz " + (count + 1) + " ta urinishda topdingiz");
System.out.println("Noma'lum son: " + n + " edi");
break;
}
if (count == 10) {
System.out.println("O'yin tugadi");
System.out.println("Noma'lum son: " + n + " edi");
break;
}
} while (true);
}
Telegram | Viktorina bot | YouTube
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Noma'lum butun sonni kiriting: ");
int n = scanner.nextInt();
int count = 0;
do {
System.out.print((count + 1) + " - urinish son kiriting: ");
int a = scanner.nextInt();
if (a > n) {
System.out.println("Siz noma'lum sondan katta son kiritdingiz");
count++;
}
if (a < n) {
System.out.println("Siz noma'lum sondan kichik son kiritdingiz");
count++;
}
if (a == n) {
System.out.println("Siz " + (count + 1) + " ta urinishda topdingiz");
System.out.println("Noma'lum son: " + n + " edi");
break;
}
if (count == 10) {
System.out.println("O'yin tugadi");
System.out.println("Noma'lum son: " + n + " edi");
break;
}
} while (true);
}
Telegram | Viktorina bot | YouTube
Telegram
PROGRAMMERS
Guruh: @Cpp_java_dasturlash
Android: @prog_mz_android
Quiz bot: @programmersQuiz_bot
Portfolio: @ProgrammersPortfolio
Reklama: https://t.iss.one/programmers_reklama/2
Kanal uchun taklif:
@Mr_Max_Telegram
@ZohidAbdullayev
Android: @prog_mz_android
Quiz bot: @programmersQuiz_bot
Portfolio: @ProgrammersPortfolio
Reklama: https://t.iss.one/programmers_reklama/2
Kanal uchun taklif:
@Mr_Max_Telegram
@ZohidAbdullayev
👍2❤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 ...
Botning C++ bo'limiga yangi savollarni va ularning javoblarini qo'shdik.
Shu bilan C++ ning Begin bo'limidagi 40 ta savolga ham javoblarni yuklab, ushbu bo'limni yakunladik 😊
Viktorina bot
Telegram | Viktorina bot | YouTube
Botning C++ bo'limiga yangi savollarni va ularning javoblarini qo'shdik.
Shu bilan C++ ning Begin bo'limidagi 40 ta savolga ham javoblarni yuklab, ushbu bo'limni yakunladik 😊
Viktorina bot
Telegram | Viktorina bot | YouTube
Telegram
PROGRAMMERS
Guruh: @Cpp_java_dasturlash
Android: @prog_mz_android
Quiz bot: @programmersQuiz_bot
Portfolio: @ProgrammersPortfolio
Reklama: https://t.iss.one/programmers_reklama/2
Kanal uchun taklif:
@Mr_Max_Telegram
@ZohidAbdullayev
Android: @prog_mz_android
Quiz bot: @programmersQuiz_bot
Portfolio: @ProgrammersPortfolio
Reklama: https://t.iss.one/programmers_reklama/2
Kanal uchun taklif:
@Mr_Max_Telegram
@ZohidAbdullayev
👏2❤1
#savol
for operatoridan foydalangan holda quyidagi ko'rinishni (fibonachchi) chiqaruvchi dastur tuzing?
Java dasturlash tilida
#javob
#java
public static void main(String[] args) {
for (int i = 1; i <= 5; i++) {
for (int k = 4; k >= i; k--) {
System.out.print(" ");
}
for (int j = 1; j <= i; j++) {
System.out.print(i + " ");
}
System.out.println();
}
}
Chiquvchi ma'lumot 👇👇👇
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Telegram | Viktorina bot | YouTube
for operatoridan foydalangan holda quyidagi ko'rinishni (fibonachchi) chiqaruvchi dastur tuzing?
Java dasturlash tilida
#javob
#java
public static void main(String[] args) {
for (int i = 1; i <= 5; i++) {
for (int k = 4; k >= i; k--) {
System.out.print(" ");
}
for (int j = 1; j <= i; j++) {
System.out.print(i + " ");
}
System.out.println();
}
}
Chiquvchi ma'lumot 👇👇👇
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Telegram | Viktorina bot | YouTube
Telegram
PROGRAMMERS
Guruh: @Cpp_java_dasturlash
Android: @prog_mz_android
Quiz bot: @programmersQuiz_bot
Portfolio: @ProgrammersPortfolio
Reklama: https://t.iss.one/programmers_reklama/2
Kanal uchun taklif:
@Mr_Max_Telegram
@ZohidAbdullayev
Android: @prog_mz_android
Quiz bot: @programmersQuiz_bot
Portfolio: @ProgrammersPortfolio
Reklama: https://t.iss.one/programmers_reklama/2
Kanal uchun taklif:
@Mr_Max_Telegram
@ZohidAbdullayev
❤1👍1🥰1
#savol
for operatoridan foydalangan holda quyidagi ko'rinishni (fibonachchi) chiqaruvchi dastur tuzing?
Java dasturlash tilida
#javob
#java
public static void main(String[] args) {
int k;
for (int i = 5; i >= 1; i--) {
k = i;
for (int j = 1; j <= i; j++) {
System.out.print(k + " ");
k = k + (5 - j);
}
System.out.println();
}
}
Chiquvchi ma'lumot 👇👇👇
5 9 12 14 15
4 8 11 13
3 7 10
2 6
1
Telegram | Viktorina bot | YouTube
for operatoridan foydalangan holda quyidagi ko'rinishni (fibonachchi) chiqaruvchi dastur tuzing?
Java dasturlash tilida
#javob
#java
public static void main(String[] args) {
int k;
for (int i = 5; i >= 1; i--) {
k = i;
for (int j = 1; j <= i; j++) {
System.out.print(k + " ");
k = k + (5 - j);
}
System.out.println();
}
}
Chiquvchi ma'lumot 👇👇👇
5 9 12 14 15
4 8 11 13
3 7 10
2 6
1
Telegram | Viktorina bot | YouTube
Telegram
PROGRAMMERS
Guruh: @Cpp_java_dasturlash
Android: @prog_mz_android
Quiz bot: @programmersQuiz_bot
Portfolio: @ProgrammersPortfolio
Reklama: https://t.iss.one/programmers_reklama/2
Kanal uchun taklif:
@Mr_Max_Telegram
@ZohidAbdullayev
Android: @prog_mz_android
Quiz bot: @programmersQuiz_bot
Portfolio: @ProgrammersPortfolio
Reklama: https://t.iss.one/programmers_reklama/2
Kanal uchun taklif:
@Mr_Max_Telegram
@ZohidAbdullayev
👍3🔥1
#javob_cpp_boolean_25
#include <iostream>
using namespace std;
int main(){
bool boolean;
int x, y;
cout << "x = ";
cin >> x;
cout << "y = ";
cin >> y;
boolean = (x < 0 && y > 0);
cout << boolean;
}
Telegram | Viktorina bot | YouTube
#include <iostream>
using namespace std;
int main(){
bool boolean;
int x, y;
cout << "x = ";
cin >> x;
cout << "y = ";
cin >> y;
boolean = (x < 0 && y > 0);
cout << boolean;
}
Telegram | Viktorina bot | YouTube
👍7❤1👏1
#savol
#javob
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];
for (int i = 0; i < n; i++) {
a[i] = scanner.nextInt();
}
System.out.print("siz kiritgan massiv elementlari: ");
for (int i = 0; i < n; i++) {
System.out.print(a[i] + " ");
}
System.out.println();
int k = 0;
n--;
while (k <= n) {
System.out.print(a[k++] + " ");
if (k - 1 >= n) break;
System.out.print(a[k++] + " ");
if (k - 1 >= n) break;
System.out.print(a[n--] + " ");
if (k - 1 >= n) break;
System.out.print(a[n--] + " ");
}
}
Telegram | Viktorina bot | YouTube
#javob
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];
for (int i = 0; i < n; i++) {
a[i] = scanner.nextInt();
}
System.out.print("siz kiritgan massiv elementlari: ");
for (int i = 0; i < n; i++) {
System.out.print(a[i] + " ");
}
System.out.println();
int k = 0;
n--;
while (k <= n) {
System.out.print(a[k++] + " ");
if (k - 1 >= n) break;
System.out.print(a[k++] + " ");
if (k - 1 >= n) break;
System.out.print(a[n--] + " ");
if (k - 1 >= n) break;
System.out.print(a[n--] + " ");
}
}
Telegram | Viktorina bot | YouTube
👍2❤1🔥1
Java.exe
7 MB
👍1🔥1
#javob_cpp_boolean_26
#include <iostream>
using namespace std;
int main(){
bool boolean;
int x, y;
cout << "x = ";
cin >> x;
cout << "y = ";
cin >> y;
boolean = (x > 0 && y < 0);
cout << boolean;
}
Telegram | Viktorina bot | YouTube
#include <iostream>
using namespace std;
int main(){
bool boolean;
int x, y;
cout << "x = ";
cin >> x;
cout << "y = ";
cin >> y;
boolean = (x > 0 && y < 0);
cout << boolean;
}
Telegram | Viktorina bot | YouTube
❤2👍1