Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- void rombo2() {
- int l;
- do
- {
- cout << "Ingrese numero entre los valores de 1 y 11: ";
- cin >> l;
- } while (l<0||l>11);
- for (int i = 1; i <= l; i++)
- {
- for (int k = l - 1; k >= i; k--)
- {
- cout << " ";
- }
- for (int j = 1; j <= i; j++)
- {
- cout << " * ";
- }
- cout << endl;
- }
- for (int i = 1; i <= l; i++)
- {
- for (int k = 1; k <= i; k++)
- {
- cout << " ";
- }
- for (int j = l-1; j >= i; j--)
- {
- cout << " * ";
- }
- cout << endl;
- }
- cin.get();
- }
- int main() {
- rombo2();
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement