Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <stdlib.h>
- #include <time.h>
- using namespace std ;
- int main() {
- float num1;
- srand(time(NULL));
- cout << "產生一個介於[0,54.00]"<<endl;
- num1=(rand()% 5401);
- num1=num1/100;
- cout << num1<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment