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 are shallow and deep copies?
Why is null pointer used?
Is it possible to have a recursive inline function in c++?
explain the reference variable in c++?
What are references in c++? What is a local reference?
write a programme to get a character and thier ASCII value
Why iomanip is used in c++?
What's the order in which the objects in an array are destructed?
What is private public protected in c++?
What is the use of main function in c++?
What is the fastest c++ compiler?
What do you mean by translation unit in c++?
What is a class template?
Explain about vectors in c ++?
What are the two main components of c++?