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...

# 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",i);
}
printf (“\n”);
}
getch();
}

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

Related

Write A Program for counting the number of words in a given string

#include<stdio.h> #include<conio.h> void main ( ) { char a [ 50]; int i ,s=1, l; printf (“enter a string); gets ( a); l = strlen(a); for ( i = 0, i < l; i ++) { if ((a[i...

Write A Program to convert given no into Equivalent Binary number

#include<stdio.h> #include<conio.h> void main ( ) { int a [20],i = 0, n; printf (“enter a number"); scanf ("%d”, & n); while ( n > 0) { a [i] = n%2; n =n/2; i + +; }...

Write A Program to print 1 to 10 even numbers using goto

#include<stdio.h> #include<conio.h> void main ( ) { int i = 1; top  : if ( i < =10) {   if (i%2 = = 0)   {    printf (“\n%d", i);   } &nb...

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