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 java is different from c and c++?
What is the output of the following program? Why?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
Explain this pointer?
What is meaning of in c++?
What is enum class in c++?
Define stacks. Provide an example where they are useful.
What is c++ iterator?
Can we define a constructor as virtual in c++?
Explain virtual destructor?
Write a program to concatenate two strings.
What is the full form of c++?
Define whitespace in C++.
What language is a dll written in?
What does new in c++ do?