Programming Test 1

Published by Successcurve Team on

Write the programme   for

12345
1234
123
12
1

Program is in C Language :-

 

#include <stdio.h>

int main()
{
    int i, j;
    for(i=5;i>=1;i--)
    {
        for(j=1;j<=i;j++)
        {
            printf("%d",j);
        }
        printf("\n");
    }

    return 0;
}

Second Demo is

 

  1. #include <stdio.h>
  2. int main()
  3. {
  4.     int i, j;
  5.     for(i=5;i>=1;i)
  6.     {
  7.         for(j=1;j<=i;j++)
  8.         {
  9.             printf(“%d”,j);
  10.         }
  11.         printf(\n);
  12.     }
  13.     return 0;
  14. }
Categories: C++ Programme

Leave a Reply

Your email address will not be published. Required fields are marked *