Commit cb9db7be authored by mary.zaqaryan's avatar mary.zaqaryan

Mary Zaqaryan Exercise_05_12 Version1

parent 7b4207e2
#include <iostream>
int
main()
{
for (int i = 1; i <= 10; i++) {
for (int j = 1; j <= i; j++) {
std::cout << "*";
}
std::cout << std::endl;
};
std::cout << std::endl;
for (int i = 1; i <= 10; i++) {
for (int j = 10; j >= i; j--) {
std::cout << "*";
}
std::cout << std::endl;
};
std::cout << std::endl;
for (int i = 1; i <= 10; i++) {
for (int j = 1; j < i; j++) {
std::cout << " ";
}
for (int k = 10; k >= i; k--) {
std::cout << "*";
}
std::cout << std::endl;
}
std::cout << std::endl;
for (int i = 1; i <= 10; i++) {
for (int j = 10; j > i; j--) {
std::cout << " ";
}
for (int k = 1; k <= i; k++) {
std::cout << "*";
}
std::cout << std::endl;
}
std::cout << std::endl;
int n = 10;
for (int i = 1; i <= 10; i++) {
for (int j = 1; j <= i; j++) {
std::cout << "*";
}
for (int k = n; k >= 1; k--) {
std::cout << " ";
}
for (int j = n; j >= 1; j--) {
std::cout << "*";
}
for (int k = 1; k <= i; k++) {
std::cout << " ";
}
for (int j = 1; j <= i; j++) {
std::cout << " ";
}
for (int k = n; k >= 1; k--) {
std::cout << "*";
}
for (int j = n; j >= 1; j--) {
std::cout << " ";
}
for (int k = 1; k <= i; k++) {
std::cout << "*";
}
std::cout << std::endl;
--n;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment