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 |
What are benefits of oop?
What is virtual Function.
what is difference between String s=new String("vali"); String s="vali"
to remove the repeated numbers from the given . i.e.., if the input is 12233 output should of 123
What is cohesion in oop?
What is OOPS and How it is different from Procedural Programming ?
23 Answers HP, Infosys, Thyrocare,
Which keyword is written to use a variable declared in one class in the other class?
what is the drawback of classical methods in oops?
write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation
1 Answers College School Exams Tests, HCL, IBM, TCS,
What is multiple inheritance ?
17 Answers Blue Star, C DAC, CDAC, Impetus, Ness Technologies, Softvision Solution,
Difference between realloc() and free?
What is the difference between pass by reference and pass by value?