Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
No Pyramid toggle
#include<stdio.h> int main() { int i,j; char k; for (i=1;i<=5;i++) { k=i; for(j=1;j<=9;j++) { if(j>5-i&&j<5+i&&k) { printf("%2d", k); j<5?k++:k--; } else { printf(" "); if(j==5) k--; } } printf("\n"); } return 0; }
run
|
edit
|
history
|
help
0
Example of scanf and basic integer manipulation - with function call
a1
18BCE2182 ASSESS_1 Q2-2
TeleBook2
child process
Lab 9 v0.9
ATM
Matrix multiplication. C
Exploiting uninitialized variable 2
Project 3 part 2 Book v0.7