powerunlimited

[1012]工程程式設計_HW2-1

Oct 27th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. //10/18: �i�u�����Ͷü�, use for
  2. #include <iostream>
  3. #include <iomanip>
  4. #include <stdlib.h>
  5. #include <time.h>
  6.  
  7. using namespace std ;
  8.  
  9. int main() {
  10.     float num1;
  11.     srand(time(NULL));
  12.     cout << "���ͤ@�Ӥ���[0,5.00]����"<<endl;
  13.     num1=(rand()% 501);
  14.     num1=num1/100;
  15.     cout << num1<<endl;
  16.  
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment