0

Output and explanation pls?

#include<stdio.h> void main() { int n=5; int i,j,k=1; for(i=0;i<n;i++) { for(j=0;j<i;j++) { printf(" "); } printf("%c",i+65); for(j=k;j<(n-1)*2;j++) { printf(" "); } if(i<n-1) { printf("%c",i+65);// 65-ASCII of 'A' } k+=2; printf("\n"); } }

15th Sep 2016, 6:37 AM
Akshay Jain
Akshay Jain - avatar
2 Respuestas
+ 2
This code prints a V with the first n letters of the alphabet on each branch.
15th Sep 2016, 8:35 AM
Zen
Zen - avatar
0
how is the spacing between letters printed?
15th Sep 2016, 8:49 AM
Akshay Jain
Akshay Jain - avatar