write a program whose output will be-
1
12
123
1234
Answer Posted / chaitanya
#include<stdio.h>
void main()
{
int s,i,j,n=1;
printf("enter the length of the sequence
");
scanf("%d",&s);
for(i=1;i<=s;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf(" ");
}
}
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is scope rule of function in c?
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
How many data structures are there in c?
How can you tell whether two strings are the same?
Should I learn data structures in c or python?
Can we declare function inside main?
Why c is procedure oriented?
Explain the difference between null pointer and void pointer.
Write a progarm to find the length of string using switch case?
What is main () in c?
What is main () in c language?
What is the purpose of ftell?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
in iso what are the common technological language?