write a C++ programming using for loop:
*
* *
* * *
* * * *
Answer Posted / debotri das
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int line,n,i;
cout<<"Enter no of line\n";
cin>>n;
for(line=1;line<=n;line++)
{
for(i=1;i<=line;i++)
{
cout<<" * ";
}
cout<<" \n ";
}
getch();
}
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is pointer to member?
Distinguish between a # include and #define.
Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?
What is the output of the following program? Why?
Can user-defined object be declared as static data member of another class?
Why is it necessary to use a reference in the argument to the copy constructor?
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
What is lvalue?
What is extern c++?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
What is the use of map in c++?
Can we define function inside main in c++?
What is the use of register keyword with the variables?
What is c++ redistributable?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples