#javob
#gita_8
Java dasturlash tilida
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
float boshSumma = scanner.nextFloat();
float p = scanner.nextFloat();
float s = 2 * boshSumma;
int oy = 0;
while (s > boshSumma) {
boshSumma += boshSumma * (p / 100);
oy++;
}
System.out.print(oy + " oyda ");
System.out.printf("%.2f", boshSumma);
System.out.print(" so'm");
}
Telegram | Viktorina bot | Portfolio
#gita_8
Java dasturlash tilida
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
float boshSumma = scanner.nextFloat();
float p = scanner.nextFloat();
float s = 2 * boshSumma;
int oy = 0;
while (s > boshSumma) {
boshSumma += boshSumma * (p / 100);
oy++;
}
System.out.print(oy + " oyda ");
System.out.printf("%.2f", boshSumma);
System.out.print(" so'm");
}
Telegram | Viktorina bot | Portfolio
β€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 Begin bo'limini yakunladik.
Viktorina bot
Telegram | Viktorina bot | Portfolio
Botdagi Kotlin bobining Begin bo'limini yakunladik.
Viktorina bot
Telegram | Viktorina bot | Portfolio
Telegram
ProgrammersQuiz
@Programmers_Dasturchi
π2β€1π₯1π₯°1π1
#savol
Oβnlik sanoq sistemasidan ikkilik sanoq sistemasiga oβtish dasturini tuzing.
#javob
#java
Java dasturlash tilida
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("O'nlik sanoq sistemasida biror son kiriting: ");
int n = scanner.nextInt();
String b = Integer.toBinaryString(n);
System.out.println(n + " sonining ikkilikdagi ko'rinishi = " + b);
}
Telegram | Viktorina bot | Portfolio
Oβnlik sanoq sistemasidan ikkilik sanoq sistemasiga oβtish dasturini tuzing.
#javob
#java
Java dasturlash tilida
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("O'nlik sanoq sistemasida biror son kiriting: ");
int n = scanner.nextInt();
String b = Integer.toBinaryString(n);
System.out.println(n + " sonining ikkilikdagi ko'rinishi = " + b);
}
Telegram | Viktorina bot | Portfolio
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
#javob
Kotlin dasturlash tilida
print("A = ")
var a = readLine()!!.toInt()
print("B = ")
val b = readLine()!!.toInt()
while (a > b) {
a -= b
}
println("A kesmaning bo'sh qismi = $a")
Telegram | Viktorina bot | Portfolio
#javob
Kotlin dasturlash tilida
print("A = ")
var a = readLine()!!.toInt()
print("B = ")
val b = readLine()!!.toInt()
while (a > b) {
a -= b
}
println("A kesmaning bo'sh qismi = $a")
Telegram | Viktorina bot | Portfolio
β€1π1π₯1π1π€©1
#javob_java_boolean_13
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
boolean bool = ((a > 0) (b > 0) (c > 0));
System.out.println(bool);
}
Telegram | Viktorina bot | Portfolio
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
boolean bool = ((a > 0)
System.out.println(bool);
}
Telegram | Viktorina bot | Portfolio
β€1π1π₯1π1
#savol
#if_19
#javob
#if_19
Kotlin dasturlash tilida
fun main() {
print("a = ")
val a = readLine()!!.toInt()
print("b = ")
val b = readLine()!!.toInt()
print("c = ")
val c = readLine()!!.toInt()
print("d = ")
val d = readLine()!!.toInt()
if (a == b && b == c && c != d) {
println(4)
} else if (a == b && b != c && b == d) {
println(3)
} else if (a != b && a == c && a == d) {
println(2)
} else if (a != b && b == c && b == d) {
println(1)
} else if (a == b && b == c && c == d) {
println("Bir xil sonlar")
} else {
println("Turli xil sonlar")
}
}
Telegram | Viktorina bot | Portfolio
#if_19
#javob
#if_19
Kotlin dasturlash tilida
fun main() {
print("a = ")
val a = readLine()!!.toInt()
print("b = ")
val b = readLine()!!.toInt()
print("c = ")
val c = readLine()!!.toInt()
print("d = ")
val d = readLine()!!.toInt()
if (a == b && b == c && c != d) {
println(4)
} else if (a == b && b != c && b == d) {
println(3)
} else if (a != b && a == c && a == d) {
println(2)
} else if (a != b && b == c && b == d) {
println(1)
} else if (a == b && b == c && c == d) {
println("Bir xil sonlar")
} else {
println("Turli xil sonlar")
}
}
Telegram | Viktorina bot | Portfolio
β€1π1π₯1π₯°1π1
#savol
#if_19
#javob
#if_19
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();
System.out.print("c = ");
int c = scanner.nextInt();
System.out.print("d = ");
int d = scanner.nextInt();
if (a == b && b == c && c != d) {
System.out.println(4);
} else if (a == b && b != c && b == d) {
System.out.println(3);
} else if (a != b && a == c && a == d) {
System.out.println(2);
} else if (a != b && b == c && b == d) {
System.out.println(1);
} else if (a == b && b == c && c == d) {
System.out.println("Bir xil sonlar");
} else {
System.out.println("Turli xil sonlar");
}
}
Telegram | Viktorina bot | Portfolio
#if_19
#javob
#if_19
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();
System.out.print("c = ");
int c = scanner.nextInt();
System.out.print("d = ");
int d = scanner.nextInt();
if (a == b && b == c && c != d) {
System.out.println(4);
} else if (a == b && b != c && b == d) {
System.out.println(3);
} else if (a != b && a == c && a == d) {
System.out.println(2);
} else if (a != b && b == c && b == d) {
System.out.println(1);
} else if (a == b && b == c && c == d) {
System.out.println("Bir xil sonlar");
} else {
System.out.println("Turli xil sonlar");
}
}
Telegram | Viktorina bot | Portfolio
β€1π1π1
#javob_java_boolean_14
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
boolean bool = ((a > 0) && (b < 0) && (c < 0)) ((a < 0) && (b > 0) && (c < 0)) ((a < 0) && (b < 0) && (c > 0));
System.out.println(bool);
}
Telegram | Viktorina bot | Portfolio
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
boolean bool = ((a > 0) && (b < 0) && (c < 0)) ((a < 0) && (b > 0) && (c < 0)) ((a < 0) && (b < 0) && (c > 0));
System.out.println(bool);
}
Telegram | Viktorina bot | Portfolio
π1π₯1π1
#savol
#if_23
#javob
#if_23
C++ dasturlash tilida
#include <iostream>
using namespace std;
int main(){
int x1, x2, x3, x4, y1, y2, y3, y4;
cout << "x1 = ";
cin >> x1;
cout << "y1 = ";
cin >> y1;
cout << "x2 = ";
cin >> x2;
cout << "y2 = ";
cin >> y2;
cout << "x3 = ";
cin >> x3;
cout << "y3 = ";
cin >> y3;
if (x1 == x2) {
x4 = x3;
} else if (x1 == x3) {
x4 = x2;
} else if (x2 == x3) {
x4 = x1;
}
if (y1 == y2) {
y4 = y3;
} else if (y2 == y3) {
y4 = y1;
} else if (y1 == y3) {
y4 = y2;
}
cout << "(" << x4 << ";" << y4 << ")";
}
Telegram | Viktorina bot | Portfolio
#if_23
#javob
#if_23
C++ dasturlash tilida
#include <iostream>
using namespace std;
int main(){
int x1, x2, x3, x4, y1, y2, y3, y4;
cout << "x1 = ";
cin >> x1;
cout << "y1 = ";
cin >> y1;
cout << "x2 = ";
cin >> x2;
cout << "y2 = ";
cin >> y2;
cout << "x3 = ";
cin >> x3;
cout << "y3 = ";
cin >> y3;
if (x1 == x2) {
x4 = x3;
} else if (x1 == x3) {
x4 = x2;
} else if (x2 == x3) {
x4 = x1;
}
if (y1 == y2) {
y4 = y3;
} else if (y2 == y3) {
y4 = y1;
} else if (y1 == y3) {
y4 = y2;
}
cout << "(" << x4 << ";" << y4 << ")";
}
Telegram | Viktorina bot | Portfolio
π2β€1π₯1π₯°1
#savol
#if_23
#javob
#if_23
Java dasturlash tilida
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();
System.out.print("x3 = ");
int x3 = scanner.nextInt();
System.out.print("y3 = ");
int y3 = scanner.nextInt();
int x4 = 0, y4 = 0;
if (x1 == x2) {
x4 = x3;
} else if (x1 == x3) {
x4 = x2;
} else if (x2 == x3) {
x4 = x1;
}
if (y1 == y2) {
y4 = y3;
} else if (y2 == y3) {
y4 = y1;
} else if (y1 == y3) {
y4 = y2;
}
System.out.println("(" + x4 + ";" + y4 + ")");
}
Telegram | Viktorina bot | Portfolio
#if_23
#javob
#if_23
Java dasturlash tilida
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();
System.out.print("x3 = ");
int x3 = scanner.nextInt();
System.out.print("y3 = ");
int y3 = scanner.nextInt();
int x4 = 0, y4 = 0;
if (x1 == x2) {
x4 = x3;
} else if (x1 == x3) {
x4 = x2;
} else if (x2 == x3) {
x4 = x1;
}
if (y1 == y2) {
y4 = y3;
} else if (y2 == y3) {
y4 = y1;
} else if (y1 == y3) {
y4 = y2;
}
System.out.println("(" + x4 + ";" + y4 + ")");
}
Telegram | Viktorina bot | Portfolio
π3β€1π₯1π₯°1
#javob_java_boolean_15
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
boolean bool = ((a > 0) && (b > 0) && (c < 0)) ((a < 0) && (b > 0) && (c > 0)) ((a > 0) && (b < 0) && (c > 0));
System.out.println(bool);
}
Telegram | Viktorina bot | Portfolio
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
boolean bool = ((a > 0) && (b > 0) && (c < 0)) ((a < 0) && (b > 0) && (c > 0)) ((a > 0) && (b < 0) && (c > 0));
System.out.println(bool);
}
Telegram | Viktorina bot | Portfolio
π2β€1π1
#savol
A va B butun soni berilgan. A va B sonlari orasidagi barcha butun sonlarni chiqaruvchi programma tuzilsin. Bunda A soni 1 marta, (A+1) soni 2 marta chiqariladi va h.k.
#javob
#kotlin
Kotlin dasturlash tilida
fun main() {
print("a = ")
val a = readLine()!!.toInt()
print("b = ")
val b = readLine()!!.toInt()
for (i in a until b) {
for (j in a..i) {
print("$i ")
}
println()
}
}
Telegram | Viktorina bot | Portfolio
A va B butun soni berilgan. A va B sonlari orasidagi barcha butun sonlarni chiqaruvchi programma tuzilsin. Bunda A soni 1 marta, (A+1) soni 2 marta chiqariladi va h.k.
#javob
#kotlin
Kotlin dasturlash tilida
fun main() {
print("a = ")
val a = readLine()!!.toInt()
print("b = ")
val b = readLine()!!.toInt()
for (i in a until b) {
for (j in a..i) {
print("$i ")
}
println()
}
}
Telegram | Viktorina bot | Portfolio
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π1
Mobil dasturlar va o'yinlardan qanday daromad qilishadi?
Ko'p kishi pulni Β«internetΒ» to'laydi deb o'ylashi mumkin. Aslida yo'q, pulni internet emas, reklama beruvchilar to'laydi.
E'tibor bergan bo'lsangiz, biror dastur yoki o'yin o'ynayotgan bo'lsangiz, internetni yoqishingiz bilanoq reklamalar chiqib boshlaydi. Ushbu reklamalar uchun ham kimdir qanchadir summa to'lagan, va shu tariqa ilova yaratuvchisi o'z mahsulotidan foyda ko'ra boshlaydi.
Ayrim dasturlar esa Play Market yoki AppStore'ning o'zida pullik bo'ladi. Bunday dasturlar o'ta mukammal va foyda dasturlardir, chunki keraksiz narsaga hech kim pul sarflamaydi.
Reklamadan tashqari, o'yinlarda har xil pullik narsalar bo'ladi. Masalan, kiyimlar, mashinalar yoki o'yin valyutasi β bular barchasi real pullar. 1$ dan 100$ gacha. Odamlar shu uchun pul sarflashadi, shu tariqa ilovalar Β«yashashΒ»da davom etishadi.
Telegram | ViktorinaBot | Portfolio
Ko'p kishi pulni Β«internetΒ» to'laydi deb o'ylashi mumkin. Aslida yo'q, pulni internet emas, reklama beruvchilar to'laydi.
E'tibor bergan bo'lsangiz, biror dastur yoki o'yin o'ynayotgan bo'lsangiz, internetni yoqishingiz bilanoq reklamalar chiqib boshlaydi. Ushbu reklamalar uchun ham kimdir qanchadir summa to'lagan, va shu tariqa ilova yaratuvchisi o'z mahsulotidan foyda ko'ra boshlaydi.
Ayrim dasturlar esa Play Market yoki AppStore'ning o'zida pullik bo'ladi. Bunday dasturlar o'ta mukammal va foyda dasturlardir, chunki keraksiz narsaga hech kim pul sarflamaydi.
Reklamadan tashqari, o'yinlarda har xil pullik narsalar bo'ladi. Masalan, kiyimlar, mashinalar yoki o'yin valyutasi β bular barchasi real pullar. 1$ dan 100$ gacha. Odamlar shu uchun pul sarflashadi, shu tariqa ilovalar Β«yashashΒ»da davom etishadi.
Telegram | ViktorinaBot | Portfolio
β€2π1π₯1π₯°1π1