Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- int main(void){
- srand(time (NULL));
- int Run= 10;
- int one=0;
- int six=0;
- printf("Run|| Ones|| Sixes\n");
- printf("----------------------------------\n");
- for (int i=1; i<=Run; i++){
- one= rand()%20;
- six= rand()%20;
- if(one==1){one++;}
- if(six==6){six++;}
- printf("%2i: %2i: %i\n",i,one,six);
- }printf("----------------------------------\n");
- printf("Ones:%i, Sixes:%i", one, six);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment