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
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
What is a volatile variable in c++?
Can you write a function similar to printf()?
Why c++ is so important?
Explain friend class?
Why is c++ a mid-level programming language?
What are the vectors in c++?
Is c++ harder than java?
What are the benefits of pointers?
What does flush do c++?
What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor
What is general form of pure virtual function? Explain?
What is the difference between a template and a macro?
What is the best free c++ compiler for windows?
What do you mean by volatile and mutable keywords used in c++?