Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- #include<time.h>
- int main(){
- int sorteado;
- srand(time(NULL));
- sorteado=(rand()%10)+1;
- int chute;
- printf("adivinhe um numero de 1 a 10:");
- scanf("%d",&chute);
- if(chute==sorteado){
- int i;
- for(i=0;i<100;i++){
- printf("sortudo kkk");
- }
- }
- else
- printf("errado,o numero sorteado foi %d",sorteado);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment