Tuesday, February 11, 2014

print delta with astrics using C Language

#include<stdio.h> 
int main(){
    char *ptr="*****";
    int i,j;
  

    for(i=1;i<10;i++){
       if(i<6)
         printf("%*.*s\n",0,i,ptr);
       else
         printf("%*.*s\n",0,10-i,ptr);
    }
    return 0;
}

Output of the Program:

No comments:

Post a Comment