Get Mystery Box with random crypto!

Bekzod code 👨‍💻

Telegram kanalining logotibi bekzod_code_bbb — Bekzod code 👨‍💻 B
Telegram kanalining logotibi bekzod_code_bbb — Bekzod code 👨‍💻
Kanal manzili: @bekzod_code_bbb
Toifalar: Texnologiyalar
Til: Oʻzbek tili
Obunachilar: 1
Kanalning ta’rifi

BBB ishlanmalari

Ratings & Reviews

1.00

2 reviews

Reviews can be left only by registered users. All reviews are moderated by admins.

5 stars

0

4 stars

0

3 stars

0

2 stars

0

1 stars

2


Oxirgi xabar

2023-04-13 14:36:25 int index = 10;
for (int i = 1; i <= index; i++) {
if(i <= index / 2) {
for (int j = 1 ; j <= index - i ; j++) {
printf(" ");
}
for (int k = 0; k < i * 2 - 1; k++){
printf(" *");
}
printf("\n");
}else{
for (int j = 1; j < i; j++) {
printf(" ");
}

for(int k = 0; k < (index - i + 1) * 2 - 1; k++){
printf(" *");


}
printf("\n");
}
}
4 views11:36
Ochish/sharhlash
2023-04-10 20:33:19 Albatta, C dasturlash tilidagi nested for tsikllari yordamida x shaklidan rombsimon shaklni chiqaradigan kodning o'zgartirilgan versiyasi:



#include

int main() {
int size = 7; // size of the x shape
int mid = size / 2; // middle row/column of x shape
int i, j; // loop variables

// outer loop for rows
for (i = 0; i < size; i++) {
// inner loop for columns
for (j = 0; j < size; j++) {
// print rhombic shape with conditional statements
if ((i <= mid && j == mid - i + 3) || (i > mid && j == i - mid + 3) || (i < mid && j == mid + i - 3) || (i >= mid && j == 9 - i - mid)) {
printf("X ");
} else {
printf(" ");
}
}
printf("\n"); // move to the next line
}
return 0;
}



Ushbu kod nested for looplar yordamida x shaklidan olingan rombik shaklni hosil qiladi. Umid qilamanki, bu yordam beradi!
4 views17:33
Ochish/sharhlash
2023-04-10 20:33:03 Albatta, C dasturlash tilida nested for looplaridan foydalangan holda ekranda rombik shaklni chop etish uchun namuna kodi:



#include

int main() {
int size = 7; // size of the rhombus
int mid = size / 2; // middle row/column of rhombus
int i, j; // loop variables

// outer loop for rows
for (i = 0; i < size; i++) {
// inner loop for columns
for (j = 0; j < size; j++) {
// print rhombic shape with conditional statements
if (i <= mid) {
if (j == mid - i || j == mid + i) {
printf("X"); // print X without space
} else {
printf(" ");
}
} else {
if (j == i - mid || j == 3 * mid - i) {
printf("X"); // print X without space
} else {
printf(" ");
}
}
}
printf("\n"); // move to the next line
}
return 0;
}



Ushbu kod C dasturlash tilida nested for sikllaridan foydalangan holda ekranda rombik shakl hosil qiladi. Umid qilamanki, bu yordam beradi!
3 views17:33
Ochish/sharhlash
2023-04-10 20:32:35 Albatta! Mana, C dasturlash tilida ichi bo'sh for tsikllari yordamida ekranda yulduzchalarning ichi bo'sh kvadratini chop etadigan misol dasturi:



#include

int main() {
int size = 5; // size of the square

// outer loop iterates for each row
for (int i = 1; i <= size; i++) {
// inner loop iterates for each column
for (int j = 1; j <= size; j++) {
// print asterisks on the edges
if (i == 1 || i == size || j == 1 || j == size) {
printf("* ");
}
// print spaces inside the square
else {
printf(" ");
}
}
printf("\n");
}

return 0;
}



Ushbu dastur yon uzunligi size bo'lgan ichi bo'sh yulduzcha kvadratini chop etadi (bu holda, 5). Turli oʻlchamdagi kvadratlarni chop etish uchun size qiymatini istalgan butun songa oʻzgartirishingiz mumkin. Savollaringiz bo'lsa, menga xabar bering!
2 views17:32
Ochish/sharhlash
2023-04-10 20:31:25 Albatta, C dasturlash tilida ichki halqalar bilan bo'sh kvadrat shakl yaratish va kvadrat ichidagi romb ichida X shaklini ko'rsatish uchun kod misoli:



#include

int main() {
int size = 10; // change the size of the square by changing this value
int i, j;

// outer loop to create the square shape
for(i = 1; i <= size; i++) {
for(j = 1; j <= size; j++) {
if(i == 1 || i == size || j == 1 || j == size) {
// if it's the first or last row or column, print *
printf("*");
} else {
// otherwise leave it empty
printf(" ");
}
}

// print a new line after each row
printf("\n");
}

// print the X shape inside the rhombus
int middle = size / 2; // calculate the middle point of the square
for(i = 1; i <= size; i++) {
for(j = 1; j <= size; j++) {
if((i == j || j == size-i+1) && i >= middle && j >= middle) {
// if it's on the diagonal from top left to bottom right or from top right to bottom left within the rhombus
printf("X");
} else {
// otherwise leave it empty
printf(" ");
}
}

// print a new line after each row
printf("\n");
}

return 0;
}



Ushbu kod yulduzcha belgisi bilan kvadrat shakl va kvadrat shakl ichidagi ichki romb ichida X shaklini yaratadi. Kvadrat o'lchamini "o'lcham" o'zgaruvchisining qiymatini o'zgartirish orqali o'zgartirishingiz mumkin. Agar sizga qo‘shimcha yordam kerak bo‘lsa, menga xabar bering.
2 views17:31
Ochish/sharhlash
2023-04-08 14:39:56 char matn[] = "Test";

char matn2[] = "est";

int son = strcmp(matn,matn2);

if(son == 0){
printf("matn teng");

}
else if(son == -1) {
printf("1-matn katta");

}
else if( son == 1) {
printf("2-matn katta");
}
else {
printf("teng emas");
3 views11:39
Ochish/sharhlash
2023-03-29 09:30:35 int row = 5;
char row2 = '#';
int i,j,c,l;

// for(i = 0; i <= row; i++){
// for(j = 1; j <= (row - i) *2 ; j++){
// printf(" ");
// }
// for(c = i; c >= 1; c--){
// printf("%c",+row2);
// }
// for(l = 0; l <= i; l++){
// printf("%c",row2);
// }
// printf("\n");
// }
5 views06:30
Ochish/sharhlash
2023-03-29 09:17:25 // Online C compiler to run C program online
#include

int main() {
for(int i = 1; i <= 5; i++){
for(int b = i; b <= 5; b++){
printf("#");
}
printf("\n");
}
printf("-----------\n") ;
for(int i = 1; i <= 5; i++){
for(int b = 1; b <= i; b++){
printf("#");
}
printf("\n");
}

printf("\n--------------\n");

int row = 5;
int i,j,c,l;

for(i = 0; i <= row; i++){
for(j = 1; j <= (row - i) ; j++){
printf(" ");
}
for(c = i; c >= 1; c--){
printf("%d",+c);
}
for(l = 0; l <= i; l++){
printf("%d",+l);
}
printf("\n");
}

return 0;
}
4 views06:17
Ochish/sharhlash
2023-03-28 18:51:14 public class Main {
    public static void main(String[] args) {
        int rows = 9;

        for (int i = 0; i <= rows; i++) {
            for (int j = 1; j <= (rows - i) * 2; j++) {
                System.out.print(" ");
            }

            for (int k = i; k >= 0; k--) {
                System.out.print(" " + k);
            }
            for (int l = 1; l <= i; l++) {
                System.out.print(" " + l);
            }

            System.out.println();
        }
    }
}
4 views15:51
Ochish/sharhlash
2023-03-27 14:45:18 // Online C compiler to run C program online
#include

int main() {
for(int i = 1; i <= 5; i++){

for(int b = i; b <= 5; b++){
printf("%d",b);
}
printf("\n");
}
for(int i = 1; i <= 5; i++){

for(int b = 1; b <= i; b++){
printf("%d",b);
}
printf("\n");
}
for(int i = 1; i <= 5; ++i){

for(int b = i; b <= 5; b++){
printf("%d",b);
}
printf("\n");
}
for(int i = 1; i <= 5; i++){

for(int b = 1; b <= i; b++){
printf("%d",b);
}
printf("\n");
}
return 0;
}
4 views11:45
Ochish/sharhlash