Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- using namespace std;
- int main()
- {
- int s, i, j;
- cout << "Ievadiet skaitli s : ";
- cin >> s;
- for ( i = 0; i < s; i++)
- {
- cout << "* ";
- }
- cout << endl;
- for (i = 0; i < s - 2; i++)
- {
- cout << "* ";
- for (j = 0; j < s - 2; j++)
- {
- cout << " ";
- }
- cout << "* " << endl;
- }
- for (i = 0; i < s; i++)
- {
- cout << "* ";
- }
- cout << endl;
- _getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement