#savol_cpp_begin_14
Aylananing uzunligi L berilgan. Uning radiusi R va yuzasi S aniqlang.
L = 2*Pi*R, S = Pi*R*R Pi = 3.14
#javob_cpp_begin_14
#include <iostream>
#include <math.h>
using namespace std;
int main(){
double l, r, s, Pi = 3.1415;
cout << "L = ";
cin >> l;
r = l / (2 * Pi);
s = Pi * r * r;
cout << "Radiusi = " << r << endl;
cout << "Yuzasi = " << s;
}
Telegram | Viktorina bot | Youtube
Aylananing uzunligi L berilgan. Uning radiusi R va yuzasi S aniqlang.
L = 2*Pi*R, S = Pi*R*R Pi = 3.14
#javob_cpp_begin_14
#include <iostream>
#include <math.h>
using namespace std;
int main(){
double l, r, s, Pi = 3.1415;
cout << "L = ";
cin >> l;
r = l / (2 * Pi);
s = Pi * r * r;
cout << "Radiusi = " << r << endl;
cout << "Yuzasi = " << s;
}
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
Media is too big
VIEW IN TELEGRAM
intelliJ IDEA
Java dasturlash tili muhitini o'rnatish videodarsligi
Telegram | Viktorina bot | Youtube
Java dasturlash tili muhitini o'rnatish videodarsligi
Telegram | Viktorina bot | Youtube
#savol
#javob
C++ dasturlash tilida
#include <iostream>
using namespace std;
int main(){
int x1, y1, x2, y2;
bool shox;
cout << "x1 = ";
cin >> x1;
cout << "y1 = ";
cin >> y1;
cout << "x2 = ";
cin >> x2;
cout << "y2 = ";
cin >> y2;
shox = ((x1 == x2 - 1) && (y1 == y2 + 1)) ||
((x1 == x2) && (y1 == y2 + 1)) ||
((x1 == x2 + 1) && (y1 == y2 + 1)) ||
((x1 == x2 - 1) && (y1 == y2)) ||
((x1 == x2 + 1) && (y1 == y2)) ||
((x1 == x2 - 1) && (y1 == y2 - 1)) ||
((x1 == x2) && (y1 == y2 - 1)) ||
((x1 == x2 + 1) && (y1 == y2 - 1));
cout << shox;
return 0;
}
Telegram | Viktorina bot | YouTube
#javob
C++ dasturlash tilida
#include <iostream>
using namespace std;
int main(){
int x1, y1, x2, y2;
bool shox;
cout << "x1 = ";
cin >> x1;
cout << "y1 = ";
cin >> y1;
cout << "x2 = ";
cin >> x2;
cout << "y2 = ";
cin >> y2;
shox = ((x1 == x2 - 1) && (y1 == y2 + 1)) ||
((x1 == x2) && (y1 == y2 + 1)) ||
((x1 == x2 + 1) && (y1 == y2 + 1)) ||
((x1 == x2 - 1) && (y1 == y2)) ||
((x1 == x2 + 1) && (y1 == y2)) ||
((x1 == x2 - 1) && (y1 == y2 - 1)) ||
((x1 == x2) && (y1 == y2 - 1)) ||
((x1 == x2 + 1) && (y1 == y2 - 1));
cout << shox;
return 0;
}
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
ColorMania 5.1 + Portable.rar
1.8 MB
Ranglarni aniqlaydigan programma
#savol
#javob
Kotlin dasturlash tilida
fun main() {
print("Boshlang'ich summani kiriting: ")
var s = readLine()!!.toDouble()
print("Foizni kiriting: ")
val p = readLine()!!.toDouble()
var oy = 0
val boshSum = 2 * s
while (s < boshSum) {
s += s * (p / 100)
oy++
println("$oy - Oy = $s So'm")
}
println("$oy oydan so'ng boshlang'ich qiymatidan 2 marta ko'p bo'ladi ")
println("$oy - oydagi pul miqdori = $s")
}
Telegram | Viktorina bot | Youtube
#javob
Kotlin dasturlash tilida
fun main() {
print("Boshlang'ich summani kiriting: ")
var s = readLine()!!.toDouble()
print("Foizni kiriting: ")
val p = readLine()!!.toDouble()
var oy = 0
val boshSum = 2 * s
while (s < boshSum) {
s += s * (p / 100)
oy++
println("$oy - Oy = $s So'm")
}
println("$oy oydan so'ng boshlang'ich qiymatidan 2 marta ko'p bo'ladi ")
println("$oy - oydagi pul miqdori = $s")
}
Telegram | Viktorina bot | Youtube
#savol
nxn o'lchamdagi matrisaning yuqori chap burchak elementlarini chiqaruvchi dastur tuzing?
#javob
#java
Java dasturlash tilida yozilgan dastur kodi
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int[][] a = new int[n][n];
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a.length; j++) {
a[i][j] = scanner.nextInt();
}
}
System.out.println("Matrisa elementlari");
for (int[] ints : a) {
for (int j = 0; j < a.length; j++) {
System.out.print(ints[j] + " ");
}
System.out.println();
}
System.out.println("Matrisaning yuqori chap burchak elementlari");
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a.length; j++) {
if (i + j <= n - 2) {
System.out.print(a[i][j] + " ");
}
}
}
}
Telegram | Viktorina bot | Youtube
nxn o'lchamdagi matrisaning yuqori chap burchak elementlarini chiqaruvchi dastur tuzing?
#javob
#java
Java dasturlash tilida yozilgan dastur kodi
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int[][] a = new int[n][n];
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a.length; j++) {
a[i][j] = scanner.nextInt();
}
}
System.out.println("Matrisa elementlari");
for (int[] ints : a) {
for (int j = 0; j < a.length; j++) {
System.out.print(ints[j] + " ");
}
System.out.println();
}
System.out.println("Matrisaning yuqori chap burchak elementlari");
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a.length; j++) {
if (i + j <= n - 2) {
System.out.print(a[i][j] + " ");
}
}
}
}
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