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
Describe explain how arrays can be passed to a user defined function
What do you mean by dynamic memory allocation in c?
what is uses of .net
Can we assign integer value to char in c?
Explain the binary height balanced tree?
what will be maximum number of comparisons when number of elements are given?
What is the total generic pointer type?
how can I convert a string to a number?
What is a function simple definition?
Write program to remove duplicate in an array?
Can we use any name in place of argv and argc as command line arguments?
Is c weakly typed?
Explain how does free() know explain how much memory to release?
What does it mean when a pointer is used in an if statement?
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }