write a program to print
*
* *
* * *
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / shani jaiswal
#include <iostream.h>
int main()
{
int a,b,c,d=5,e=1,f=3;
for(c=1;c<=d;c++)
{
for(a=0;a<f;a++)
cout<<" ";
for(b=0;b<e;b++)
cout<<"* ";
cout<<'\n';
d--;
e++;
f--;
}
return 0;
| Is This Answer Correct ? | 0 Yes | 0 No |
why c++ is called OOPS? waht is inherutance? what is compiler?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
why in java first invoke public static void main(String args[]) method????Why not public static void method1(String args[])??
What is the difference between class and object?
What are the valid types of data that the main () can return in C/C++ language
What is abstract class in oop?
can we create and enter the data & hide files using programmes ?
What is object and class in oops?
any one please tell me the purpose of operator overloading
what is inline function?
What is object in oop?
can you explain how to use JavaBean in Project