Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- int main(){
- char encore;
- system("mode 60, 22");
- //Titre
- printf("%c=====================================%c\n", 201, 187);
- printf("%c G%cn%crateur de nombres (10 affich%cs) %c\n", 186, 130, 130, 130, 186);
- printf("%c=====================================%c\n\n", 200, 188);
- //Nombre aléatoire
- int x=0;
- //Changement de série
- srand(time(NULL));
- //Nombre
- while (x<10){
- printf ("%d\n", rand()%101);
- x++;
- }
- //Relancement (oui)
- printf("\n\n\n[Y] Pour une nouvelle g%cn%cration\n[N] Pour quitter\n\n", 130, 130);
- scanf("%s", &encore);
- if(encore == 'Y'){
- main();
- }
- else if(encore == 'y'){
- main();
- }
- //Quitter (Non)
- else if(encore == 'N')
- exit(0);
- else if(encore == 'n')
- exit(0);
- //Autres
- if(encore == 'q');
- printf("\nLa prochaine fois, choisissez entre Y (oui) ou N (non) :)\nAppuyez sur [ENTER] pour quitter.\n");
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement