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
How long to learn object oriented programming?
What is polymorphism oop?
What is debug class?what is trace class? What differences are between them? With examples.
Why is object oriented programming so hard?
Can a varargs method be overloaded?
write a programe to calculate the simple intrest and compund intrest using by function overlading
What is a class oop?
how to get the oracle certification? send me the answer
Can an interface inherit a class?
This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.
What is polymorphism and example?
What are benefits of oop?
If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?
what are the ways in which a constructors can be called?
What is the difference between a constructor and a destructor?