This a pattern... Print this using C language.
*
**
***
****
*****
****
***
**
*
Source Code:
- #include<stdio.h>
- int main(){
- int row,col,n;
- printf("~~~~~Thanks for visit browncodeit.blogspot.com~~~~~~~~~\n");
- printf("Enter the numebr: ");
- scanf("%d",&n);
- for(row=1;row<=n;row++){
- for(col=1;col<=row;col++){
- printf("*");
- }
- printf("\n");
- }
- for(row=n;row>=1;row--){
- for(col=1;col<row;col++){
- printf("*");
- }
- printf("\n");
- }
- return 0;
- }
0 comments:
Post a Comment