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 |
wht is ditch
What is difference between polymorphism and inheritance?
What is polymorphism? Explain with an example.
Write a program to get the binary tree.
What are benefits of oop?
Write a C++ program to conduct an election of a mayor.Declare a class ELECTION With the following specification: Data member: Name 25 character Age Integer symbol 1 character Member functions: To accept data for 20 contestant To accept symbol as voting from 100 voters. To declare the winner and the loser.
1 Answers Global Academy, Infotech,
How do you achieve runtime polymorphism?
What makes a language oop?
We have a scale and 7 balls. 1 ball is heavier than all the rest. How to determine the heaviest ball with only 3 possible weighing attempts?
write a progra in c++ using class & object to find out wheather a given no. is prim or not.
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
What is methods in oop?