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
Why do we use & in c?
Can math operations be performed on a void pointer?
Explain how can a program be made to print the name of a source file where an error occurs?
The difference between printf and fprintf is ?
in linking some of os executables are linking name some of them
Why c is a procedural language?
Can variables be declared anywhere in c?
What is the argument of a function in c?
Tell me what is null pointer in c?
What is the collection of communication lines and routers called?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
What is structure padding in c?
What is action and transformation in spark?
When can you use a pointer with a function?
When should a type cast not be used?