Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3.  
  4. using namespace std;
  5. int main()
  6. {
  7. int s, i, j;
  8. cout << "Ievadiet skaitli s : ";
  9. cin >> s;
  10.  
  11. for ( i = 0; i < s; i++)
  12. {
  13. cout << "* ";
  14. }
  15. cout << endl;
  16.  
  17. for (i = 0; i < s - 2; i++)
  18. {
  19. cout << "* ";
  20. for (j = 0; j < s - 2; j++)
  21. {
  22. cout << " ";
  23. }
  24. cout << "* " << endl;
  25. }
  26. for (i = 0; i < s; i++)
  27. {
  28. cout << "* ";
  29. }
  30. cout << endl;
  31. _getch();
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement