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

super problem this is......

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

thank you

Is This Answer Correct ?    10 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how does free() know explain how much memory to release?

667


Write a code to generate a series where the next element is the sum of last k terms.

840


How can I find the modification date and time of a file?

698


Explain high-order and low-order bytes.

770


Can you add pointers together? Why would you?

748






What is typedef example?

724


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

719


What is the difference between text and binary i/o?

667


Compare interpreters and compilers.

727


What is an example of structure?

682


What are the application of void data type in c?

883


what is the structure pointer?

1728


Can we declare variables anywhere in c?

678


How can I call fortran?

723


Why shouldn’t I start variable names with underscores?

710