Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
c program for hollow rhombus
//gcc 5.4.0 #include <stdio.h> int main() { int n; int i,j; printf("Enter n"); scanf("%d",&n); for(i=0;i<n;i++) { for(j=n-1;j>=i;j--) { printf(" "); } printf("*"); for(j=1;j<(i-1)*2;j++) { printf(" "); } if(i>1) { printf("*"); } printf("\n"); } for(i=n-1;i>=1;i--) { for(j=n-1;j>=i;j--) { printf(" "); } printf("*"); for(j=1;j<(i-1)*2;j++) { printf(" "); } if(i>1) { printf("*"); } printf("\n"); } }
run
|
edit
|
history
|
help
1
hwk2
1233333
Assignment 3
150109_RecursividadParImpar
-Wall
C dynamic string implementation using preprocessor
888 BONUS LAB 1
fgets and basic string manipulation
DUE BY TUESDAY
FizzBuzz