1.02K subscribers
1.77K photos
420 videos
676 files
3.85K links
Download Telegram
#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
ideaIC-2021.2.3.exe
650.8 MB
intelliJ IDEA
Java dasturlash tili muhiti

Telegram | Viktorina bot | Youtube
jdk-17_windows-x64_bin.zip
170.8 MB
JDK - 17
Java dasturlash tili muhitida ishlash uchun o'rnatiladi

Telegram | Viktorina bot | Youtube
Media is too big
VIEW IN TELEGRAM
intelliJ IDEA
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
#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
#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