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 is #define in c?
What are near, far and huge pointers?
What are qualifiers?
What is f'n in math?
Write a program that accept anumber in words
What does d mean?
Explain what are multidimensional arrays?
writ a program to compare using strcmp VIVA and viva with its output.
List some basic data types in c?
What is the difference between struct and union in C?
What is the difference between int main and void main in c?
What is the difference between a function and a method in c?
what do the 'c' and 'v' in argc and argv stand for?
Explain how do you use a pointer to a function?
What is the meaning of c in c language?