Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Random Number Generator
- #include<stdio.h>
- #include<time.h>
- #include<windows.h>
- int Max, Min, value;
- void Start_up( )
- {
- printf("Random Number Generator "); Sleep(2000);
- printf("by Tran V.Anh AKA Wade Rollins\n");
- }
- void Input( )
- {
- printf("Minium value: ");
- scanf("%d",&Min);
- printf("Maximum value: ");
- scanf("%d", &Max);
- }
- void Processing( )
- {
- int Subtract;
- printf("Instant time for random generator: %d\n", time(NULL));
- srand(time(NULL));
- Subtract=Max-Min;
- value=Min+(rand( )%Subtract);
- }
- void Output( )
- {
- printf("Value: %d", value);
- }
- int main( )
- {
- Start_up( );
- Input( );
- Processing( );
- Output( );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement