#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { srand(time(0)); int a=rand()%5+1; int b; cin>>b; if(a==b){ cout<<"中奖了"; }else{ cout<<"没中奖,号码是:"<<a; } return 0; }
标签:std,rand,main,int,彩票,include From: https://www.cnblogs.com/As10016/p/17397945.html