Advertisement
brsjak

Ramka - SP Lab 4

Oct 25th, 2016
632
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.     int n, i, j;
  5.     scanf("%d", &n);
  6.     for(i=0;i<n;i++){
  7.         printf("+");
  8.     }
  9.     printf("\n");/* dokolku vi javuva greska vo pecatenje obidete
  10.     se da go stavite printf("\n") vo zagrardite, a izbrisete go postoeckiot ili izbrisete gi samite zagradi
  11.     I po zelba trgnete go komentarov koga ke ste na vezbi :)
  12. */
  13.     for(i=1;i<n-1;i++){
  14.         printf("+");
  15.         for(j=1;j<n-1;j++){
  16.            printf("-");
  17.         }
  18.         printf("+\n");
  19.     }
  20.     for(i=0;i<n;i++) printf("+");
  21.     printf("\n");
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement