Advertisement
noobzone

main

Jan 27th, 2014
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.79 KB | None | 0 0
  1. /*
  2.  ============================================================================
  3.  Name        : batalha.c
  4.  Author      :
  5.  Version     :
  6.  Copyright   : Your copyright notice
  7.  Description : Hello World in C, Ansi-style
  8.  ============================================================================
  9.  */
  10.  
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13.  
  14. int main(void) {
  15.     int tamanho; int retry;
  16.     do{
  17.         retry=0;
  18.     printf("bem vindo. introduza o tamanho do campo (10,15,20)\n");
  19.     scanf("%d", &tamanho);
  20.     switch (tamanho)
  21.     {
  22.         case 10:
  23.             jogo_10();
  24.             break;
  25.         case 15:
  26.             jogo_15();
  27.             break;
  28.         case 20:
  29.             jogo_20();
  30.             break;
  31.         default:
  32.     printf("tamanho inválido. inserir novamente?(0 para não, 1 para sim)\n");
  33.     scanf("%d",&retry);
  34.     }
  35.     }while(retry==1);
  36.         return EXIT_SUCCESS;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement