write a program to print
*
* *
* * *

Answer Posted / nash

#include <iostream>
using namespace std;
int main()
{
int i, j, k, m = 10, n;
for (i=0; i<=10; i++){
// Insert one loop to cal culate space to
be kept at start point
for (j=1; j<=m; j++){
cout << " ";
}
for (k=0; k<=i; k++){
cout << " *"; // put here "space
*" so all aligns properly like star

}
cout << '\n';
m--;
}
cin >> n;
return 0;
}

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to find 2 power of a 5digit number with out using big int and exponent ?

1891


can inline function declare in private part of class?

3655


what is the sylabus for priliminaries?

1681


What is stream in oop?

835


hi all..i want to know oops concepts clearly can any1 explain??

1681






What is object in oop with example?

692


What is the point of oop?

646


Prepare me a program for the animation of train

1992


What are benefits of oop?

631


What are properties in oop?

606


What is the difference between inheritance and polymorphism?

585


What type of loop is a for loop?

682


What is polymorphism used for?

566


What is the difference between abstraction and polymorphism?

609


Why multiple inheritance is not possible?

594