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
Is array name a pointer?
Explain the use of 'auto' keyword
Why do we need functions in c?
Explain what are the different data types in c?
How to delete a node from linked list w/o using collectons?
How can I write a function that takes a format string and a variable number of arguments?
Explain how can you tell whether a program was compiled using c versus c++?
What does s c mean on snapchat?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
Are bit fields portable?
What is null pointer constant?
Write a program to swap two numbers without using third variable in c?
What is a macro in c preprocessor?
What does 4d mean in c?