parkside's triangle..

create a program like this..

enter the size: 6
enter the seed: 1

output:

1
23
456
7891
23456
789123

sample2:

enter the size: 5
enter the seed: 3

output:

3
45
678
9123
45678

parkside should not exceed 10 while its seed should only be
not more than 9..

Answer Posted / prashant

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
printf("enter the size");
scanf("%d",&n1);
printf("enter the seed");
scanf("%d",&n2);
for(i=1;i<n1;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    2 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should a type cast be used?

573


When we use void main and int main?

584


how could explain about job profile

1446


What is volatile variable in c with example?

580


Why we use stdio h in c?

573






What is the difference between exit() and _exit() function?

596


why do some people write if(0 == x) instead of if(x == 0)?

648


What is the -> in c?

577


How can you increase the size of a statically allocated array?

608


What is .obj file in c?

641


Which header file should you include if you are to develop a function which can accept variable number of arguments?

797


What do you mean by recursion in c?

620


Why we write conio h in c?

553


Describe dynamic data structure in c programming language?

599


What is a stream water?

648