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 the difference between structures and unions?
How to declare a function pointer?
What is the use of class in c++?
What is format for defining a structure?
Is ca high or low level language?
Out of fgets() and gets() which function is safe to use?
Can we define a constructor as virtual in c++?
Explain about Garbage Collector?
Explain about vectors in c ++?
what does the following statement mean? int (*a)[4]
What is the extraction operator and what does it do?
What are the advantages of using const reference arguments in a function?
What is array in c++ pdf?
How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?
Explain explicit container.