Skip to content

Instantly share code, notes, and snippets.

@feynon
Created November 23, 2018 14:38
Show Gist options
  • Save feynon/d622db6d3050aeaa2dc1a493e39ddcee to your computer and use it in GitHub Desktop.
Save feynon/d622db6d3050aeaa2dc1a493e39ddcee to your computer and use it in GitHub Desktop.
/*
ABCDE
FGHI
JKL
MN
O
*/
#include <stdio.h>
void printrecur(int n, int i)
{
static char c='A';
static int d=1;
if(n<1){
return;
}
if(i <= n){
printf("%c",c);
c++;
printrecur(n, i+1);
}
else{
printf("\n");
for(int i=0;i<d;i++)
printf(" ");
d++;
printrecur(n-1, 1);
}
}
int main()
{
int n;
printf("Kya hai? - ");
scanf("%d", &n);
printrecur(n, 1);
return 0;
}
@crancarch
Copy link

pakad liya launde ne.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment