Add bin dir
This commit is contained in:
parent
235cd27740
commit
8964417d4b
|
@ -0,0 +1,17 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
#include <ctime>
|
||||
|
||||
//生成在[begin,end]范围内的随机数
|
||||
double randnum(int begin = 0, int end = 1){
|
||||
srand(time(NULL));
|
||||
return (rand()%(end-begin+1))+begin;
|
||||
}
|
||||
|
||||
//24点主类
|
||||
class Game24{};
|
||||
|
||||
int main(int argc, char ** argv){
|
||||
printf("%f",randnum(1,13));
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue