write a program whose output will be-
1
12
123
1234
Answer Posted / tanish kumar
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr ();
int i, j, n;
cout <<"Enter the value of n=";
cin>>n;
for (i=1;i <=n;i++)
{
for (j=1;j <=i;j++)
{
cout <<j <<" ";
}
cout <<endl;
}
getch ();
}
Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
What will be the outcome of the following conditional statement if the value of variable s is 10?
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
What are the functions to open and close file in c language?
What is the easiest sorting method to use?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
What is %lu in c?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What is the size of a union variable?
Do you know null pointer?
What is NULL pointer?
What is a file descriptor in c?
Explain the difference between exit() and _exit() function?
write a program to print data of 5 five students with structures?
What is the use of gets and puts?
How can I read in an object file and jump to locations in it?