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
What is the difference between array and structure in c?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
What are the different types of pointers used in c language?
Can you assign a different address to an array tag?
Explain what is the use of a semicolon (;) at the end of every program statement?
Where static variables are stored in memory in c?
How can you determine the size of an allocated portion of memory?
Write a program to find the biggest number of three numbers in c?
Explain do array subscripts always start with zero?
What is property type c?
What is dynamic memory allocation?
How can I recover the file name given an open stream or file descriptor?
What is an example of structure?
Explain what are reserved words?
What is 1d array in c?