write a c++ programe to print a triangle without (for)
Write a function that print a triangle of stars.
Try the triangle program on a search engine. Replace numbers with stars and that should do the trick
The three stars that make up The Summer Triangle are: Vega, Altair, and Deneb.Look below at Sources and related links to see the stars and constellations of The Summer Triangle.
To print the upper triangle of a matrix, iterate through its rows and columns, printing elements where the column index is greater than or equal to the row index. For the lower triangle, print elements where the column index is less than or equal to the row index. In programming languages like Python, this can be easily achieved using nested loops. For example, for a matrix A, the upper triangle can be printed with for i in range(n): for j in range(i, n): print(A[i][j]), and similarly for the lower triangle.
Using base in a derived class invokes the base class's corresponding method. For example, something like: class Shape{ public void print(){printf("Generic shape"); ... } class Triangle:Shape{ public void print(){printf("Triangle"); ... } int main() { Triangle x; x.print(); // Should print "Triangle" x.base.print(); // Should print "Generic shape" return 0; }
No.
The three stars are Sirius, Betelgeuse and Procyon.
start > read a,b > A=a*b/2 > print A >stop.
a triangle then a square :)
See related link for a star map
Triangles. It's all triangles. Look up at night and pick out any three stars. They will be in a triangle.
Triangles. It's all triangles. Look up at night and pick out any three stars. They will be in a triangle.