triangle number finding program...



triangle number finding program.....

Answer / 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

More C Interview Questions

write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

0 Answers  


Write a main() program that calls this function at least 10 times. Try implementing this function in two different ways. First, use an external variable to store the count. Second, use a local variable. Which is more appropriate?

2 Answers  


Why is c so powerful?

0 Answers  


which is conditional construct a) if statement b) switch statement c) while/for d) goto

0 Answers  


What are two dimensional arrays alternatively called as?

0 Answers  






Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

0 Answers   HP,


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

0 Answers  


Explain the use of bit fieild.

0 Answers  


consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } the final value of x is

4 Answers   TCS,


What is array in C

0 Answers  


When should the register modifier be used? Does it really help?

0 Answers  


how do you execute a c program in unix.

0 Answers  


Categories