Advertisement
Guest User

Untitled

a guest
Oct 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.16 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4.  
  5. int stampaSchermata(char[3][3]);
  6.  
  7. main()
  8. {
  9.     char giocatore1[1024], giocatore2[1024], matrice[3][3];
  10.     int i, a;
  11.     printf("inserisci i nomi dei giocatori\n");
  12.     scanf("%s %s", &giocatore1, &giocatore2);
  13.     for(i=0; i<3; i++)
  14.     {
  15.         for(a=0; a<3; a++)
  16.         matrice[i][a] = 'a';
  17.     }
  18.     stampaSchermate(char matrice[3][3]);
  19.     return 0;
  20. }
  21.  
  22. int stampaSchermate(char matrice[3][3])
  23. {
  24.     printf("____________________________ \n");
  25.     printf("|        |        |        | \n");
  26.     printf("|   %c    |   %c    |   %c    | \n", matrice[0][0], matrice[0][1], matrice[0][2]);
  27.     printf("|        |        |        | \n");
  28.     printf("|--------------------------| \n");
  29.     printf("|        |        |        | \n");
  30.     printf("|   %c    |   %c    |   %c    | \n", matrice[1][0], matrice[1][1], matrice[1][2]);
  31.     printf("|        |        |        | \n");
  32.     printf("|--------------------------| \n");
  33.     printf("|        |        |        | \n");
  34.     printf("|   %c    |   %c    |   %c    | \n", matrice[2][0], matrice[2][1], matrice[2][2]);
  35.     printf("|        |        |        | \n");
  36.     printf("|________|________|________| \n");
  37.     return 2;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement