#include<iostream>
int main()
{
std::cout << "Floyd's triangle\n" << std::endl;
size_t value = 0;
size_t row = 0;
while (row++ < 10)
{
size_t col = 0;
while (col++ < row)
std::cout << ++value << '\t';
std::cout << std::endl;
}
std::cout <<std::endl;
}
Output:
Floyd's triangle
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 32 33 34 35 36
37 38 39 40 41 42 43 44 45
46 47 48 49 50 51 52 53 54 55
a triangle then a square :)
write a c++ programe to print a triangle without (for)
Write a function that print a triangle of stars.
write a program to print A to Z on screen in c?
{A program to compute the area of a triangle} {by Ogboin W. Meshach} Var; b,h:real; BEGIN Writeln('Triangle'); Write('Base: '); Readln(base); Write('Height: '); Readln(height); area:=0.5*base*height; Writeln('Area: ', area :0:2); End.
echo 'print a pattern'
Try the triangle program on a search engine. Replace numbers with stars and that should do the trick
No.
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
write a program to print the series 1/12+1/22+.........+1/n2 ?
good morning
Yes.