Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int m,n=1;
- scanf("%d", &m);
- //prv red
- printf("+");
- while(n<m-1){
- printf("*");
- n++;
- }
- printf("+\n");
- //sreden red
- for(int i=0; i<m-2; i++){
- n=1;
- printf("+");
- while(n<m-1){
- printf("%%");
- n++;
- }
- printf("+\n");
- }
- //posleden red
- n=1;
- printf("+");
- while(n<m-1){
- printf("*");
- n++;
- }
- printf("+\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement