write a program for printing the following number format

# include<stdio.h>
#include<conio.h>
void main ( )
{
int i, j;
for ( i = 1; i < = 4 ; i ++)
{
for ( j =1; j < = i; j ++)
{
 printf("%d\t",j);
}
printf (“\n”);
}
getch();
}

Out Put:
1
1 2
1 2 3
1 2 3 4

Related

Program for Sum of Diagonal Elements of a Square Matrix

#include<stdio.h> #include<conio.h> main ( ) { int a [10][10],m, n, i, j, s=0; printf ( “enter number of rows and columns”); scanf (“%d%d”, & m, & n); printf ( “enter elem...

Program to find square root of a given number using Functions

# include <stdio.h> #include<conio.h> int square ( int n); main ( ) { int n, s; printf (“enter a number”); scanf (“%d”, &n); s=square (n); printf (“\n% d”, s); getch ( ); }...

Program for Sorting of n Elements in an Array

# include <stdio.h> #include<conio.h> main( ) { int a [10], n, i, k,j; printf (“enter size of an array”); scanf ( “%d“, &n); printf (“enter elements into an array”); for ( i...

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item