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 sorting in c plus plus?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
write a program to print data of 5 five students with structures?
Is using exit() the same as using return?
What are the functions to open and close the file in c language?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
What is d'n in c?
What is int main () in c?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
Is printf a keyword?
What are header files? What are their uses?
What is difference between union All statement and Union?
Tell me what is the purpose of 'register' keyword in c language?
Explain what are multidimensional arrays?