My C programs: Triangle 1 හරි ත්‍රිකෝනය





#include<stdio.h>
int main(){


int a;
printf("enter value : ");
scanf("%d",&a);
int b,d=0,e;
for(a+1;a>0;a--){
++d;
for(b=a;b>0;b--){
printf(" ");
}
for(e=(d*2)-1;e>0;e--){
printf("*");
}
printf("\n");
}
return 0;
}

No comments:

Post a Comment