Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int m , n;
- while(scanf("%d %d", &m , &n)==2)
- {
- char ostatni='x' , znak;
- for(int i=0 ; i<m ; i++)
- {
- if(n%2==0)
- {
- if(ostatni=='x')
- {
- ostatni='o';
- }
- else
- {
- ostatni='x';
- }
- }
- for( int j=0 ; j<n ; j++)
- {
- if(ostatni=='x')
- {
- znak='o';
- }
- else
- {
- znak='x';
- }
- printf("%c", znak);
- ostatni=znak;
- }
- printf("\n");
- }
- printf("\n");
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment