powerunlimited

Untitled

Oct 22nd, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4.  
  5. using namespace std;
  6. int main(){
  7.  
  8.  
  9.   int a, n;
  10.  float b;
  11.  
  12.  srand( static_cast<unsigned int>(time(NULL)) );;
  13.  
  14.  
  15.  
  16.  a = rand()%3001;
  17.  b = (float)a / 100;
  18.  
  19.  cout<< b << endl ;
  20.  
  21.  
  22.  return 0 ;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment