function which is returning void data type

void ass();
void main(){
    clrscr();
    ass();
    getch();
}
void ass(){
    int i,j;
    for(i=0;i<5;i++){
         for(j=0;j<i;j++)
             printf("%*.*c",2,j,'*');
             printf("\n");
    }
}
Output:
*
**
***
****
Post a Comment