Loading ...
Global Do...
News & Politics
6
0
Try Now
Log In
Pricing
Code ก <Credit by DJ OoM > กก ก for ก ก ก if !!"#$ ก% & ' ()ก* No. Code 1 #include <stdio.h> 2 #include <stdlib.h> 3 int main() 4 { 5 int n,x,y; 6 printf("Enter row: "); 7 scanf("%d",&n); 8 9 for(x=-(n/2);x<=n/2;x++) 10 { 11 for(y=-(n/2);y<=n/2;y++) 12 { 13 if(abs(x)>=abs(y) && abs(x)<=n/4) 14 printf("*"); 15 else 16 printf(" "); 17 } 18 printf("\n"); 19 } 20 } No. Code 1 #include <stdio.h> 2 #include <stdlib.h> 3 main() 4 { 5 int x,y,n; 6 printf("Enter the n to make clock sand <n>=11> : "); 7 scanf("%d",&n); 8 for (x=(-n/2);x<=(n/2);x++) 9 { 10 for (y=(-n/2);y<=(n/2);y++) 11 { 12 if (abs(x)==abs(y)) 13 { 14 printf("X"); 15 } 16 else 17 { 18 if (abs(y)==n/2) 19 { 20 printf("X"); 21 } 22 else 23 { 24 if (abs(x)==n/2) 25 { 26 printf("X"); 27 } 28 else 29 { 30 if (abs(x)<abs(y)) 31 { 32 printf(" "); 33 } 34 else 35 { 36 printf("."); 37 } 38 } 39 } 40 } 41 } 42 printf("\n"); 43 } 44 } Code ก <Credit by Greenista > กก ก for ก !!*ก ก+กก ก ก if ''ก "ก& !'ก ก ก !!"#$ ก% & ' ()ก* ก