how can i get output like this?
1
2 3
4 5 6

Answer Posted / arun asokan

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

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is void c?

573


Explain the term printf() and scanf() used in c language?

600


What does the error message "DGROUP exceeds 64K" mean?

729


Is boolean a datatype in c?

553


What is mean by data types in c?

557






Give the rules for variable declaration?

682


Where is volatile variable stored?

657


why we wont use '&' sing in aceesing the string using scanf

1787


What are the types of macro formats?

613


What is a node in c?

554


What is the difference between single charater constant and string constant?

629


What is double pointer?

563


Which header file is used for clrscr?

586


The __________ attribute is used to announce variables based on definitions of columns in a table?

677


Are local variables initialized to zero by default in c?

557