Advertisement
Guest User

user

a guest
Jul 26th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int errou = 1;
  4. int numero = 6, n_usuario;
  5.  
  6. void main(){
  7.   while(errou){
  8.     printf("Escolha um numero entre 0 e 9: ");
  9.     scanf("%d", &n_usuario);
  10.     if(n_usuario == numero){
  11.       printf("VocĂȘ acertou!\n");
  12.       errou = 0;
  13.     } else {
  14.       printf("VocĂȘ errou, tente novamente. ");
  15.     }
  16.   }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement