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
Where static variables are stored in c?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
c language interview questions & answer
What is null in c?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
In C programming, what command or code can be used to determine if a number of odd or even?
How can you call a function, given its name as a string?
how do you execute a c program in unix.
Is javascript written in c?
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier. Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed. When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed. Sequence of take-off is the sequence of addition to the waitlist
Define C in your own Language.
How can I access an I o board directly?
What are the disadvantages of c language?
Can a file other than a .h file be included with #include?
What is the difference between array and pointer in c?