triangle number finding program...

Answer Posted / sevak.yatrik777

#include<stdio.h>

#include<conio.h>

main()

{

int n,i,j;

clrscr();

printf("enter the number");

scanf("%d",&n);

for(i=1;i<=n;i++)

{

for(j=1;j<=i;j++)

printf("%d",j);

printf("\n");

}

getch();

}

Read more:
http://wiki.answers.com/Q/C_program_to_generate_parkside%27s_triangle_numbers#ixzz1M2ugMMU6

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are the variables argc and argv are local to main?

793


Explain what are the different file extensions involved when programming in c?

639


Does sprintf put null character?

607


where are auto variables stored? What are the characteristics of an auto variable?

597


What is function prototype?

613






What are the functions to open and close the file in c language?

597


How can you find the day of the week given the date?

621


praagnovation

1781


What are inbuilt functions in c?

562


Explain what will the preprocessor do for a program?

607


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

615


Can we declare variable anywhere in c?

539


What is the difference between procedural and declarative language?

657


What is c programing language?

617


What is the difference between arrays and pointers?

638