Responsive Ads Here

Wednesday, November 26, 2014

peramid print using loop

peramid print using loop

 

 

image

#include<stdio.h>
main()
{
    int i,j,k;
    for(i=1;i<=10;i++)
    {
        for(k=1;k<=i;k++)
             {
                 printf(" ");
            }
        for(j=i;j<=10;j++)
            {
                printf("*");
            }
        printf("\n");
    }
 
}


 


image



#include<stdio.h>
main()
{
    int i,j;
    for(i=1;i<10;i++)
    {
        for(j=i;j<10;j++)
        {
            printf("*");
        }
        printf("\n");
    }
}

image



#include<stdio.h>
main()
{
    int i,j;
    for(i=1;i<10;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("*");
        }
        printf("\n");
    }
}

 


image


 



#include<stdio.h>
int main()
{
    float i,j,k;
 
    for (i=1;i<=9;i++)
{
    for (k=i;k<9;k++)
    printf(" ");
    for (j=1;j<=i;j++)
    printf("*");
    printf("\n");
}
return 0;
}

 


image


 



#include<stdio.h>
int main()
{
    int i,j,k;
 
    for (i=1;i<=9;i++)
{
    for (k=i;k<9;k++)
      printf(" ");
    for (j=1;j<=i;j++)
      printf(" *");
    printf("\n");
}
return 0;
}

No comments:

Post a Comment

php4

<?php    // Start the session  session_start();  ?>  <!DOCTYPE html>  <html>  <head>       <link rel=&q...