Can anyone help me with this please? Need to print the below
values.. Thanks

1
1 2
1 2 3
1 2 3 4

Answer Posted / mohit (firozabad, a.d.college)

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

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is merge sort in c?

651


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

719


What is the difference between scanf and fscanf?

672


Explain what are its uses in c programming?

600


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

1496






Can we access array using pointer in c language?

650


What are 3 types of structures?

596


What are the advantages of using new operator as compared to the function malloc ()?

762


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

632


What is %lu in c?

691


what is the significance of static storage class specifier?

1667


How can I insert or delete a line (or record) in the middle of a file?

579


What does the format %10.2 mean when included in a printf statement?

1095


How do you construct an increment statement or decrement statement in C?

747


Explain what are reserved words?

639