Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. # include <stdio.h>
  2.  
  3. int loop (int n, int x, int y, int cont, int reino)
  4. {
  5.     int moedas;
  6.     char movimento;
  7.     getchar();
  8.     scanf("%c", &movimento);
  9.  
  10.     if (num == cont)
  11.     {
  12.  
  13.     }
  14.  
  15.     else
  16.     {
  17.         if (movimento == 'D')
  18.         {
  19.             reino = -1;
  20.            
  21.         }
  22.  
  23.         else if (movimento = 'C')
  24.         {
  25.             reino = 1;
  26.         }
  27.     }
  28.    
  29. }
  30.  
  31. int main()
  32. {
  33.     int n, x, y, i;
  34.     scanf("%d", &n);
  35.     loop (n, 0, 0, 0, 0); //inicio em (0,0) e no reino 0;
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement