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 the difference between c and python?
how can f be used for both float and double arguments in printf? Are not they different types?
What is wrong with this program statement? void = 10;
What is mean by data types in c?
What is variable and explain rules to declare variable in c?
What are the 5 elements of structure?
How many types of arrays are there in c?
Which type of language is c?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
Why c is called object oriented language?
What is n in c?
What is binary tree in c?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
What does %c do in c?
What are c header files?