Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int main(){
- int a, n;
- float b;
- srand( static_cast<unsigned int>(time(NULL)) );;
- a = rand()%3001;
- b = (float)a / 100;
- cout<< b << endl ;
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment