Posted by : Unknown
Wednesday, February 3, 2016
*
***
*****
*******
*********
*********
*********
*** ***
*** ***
*** ***
*** ***
Ans:
#include<stdio.h>
int main(){
char *ptr="*********";
int i,j;
for(i=0;i<11;i++){
if(i<5)
printf("%*.*s\n",5+i,2*i+1,ptr);
else{
if(i==7){
*(ptr+3)=' ';
*(ptr+4)=' ';
*(ptr+5)=' ';
}
printf("%*.*s\n",9,9,ptr);
}
}
return 0;
}
**********OUTPUT**********
*
***
*****
*******
*********
*********
*********
*** ***
*** ***
*** ***
*** ***
*************************
Related Posts :
- Back to Home »
- Star Patterns »
- 28.Up Arrow shape as using *'s as shown below (Using Pointer)