中奖

#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main(int argc, char** argv) {
    srand(time(0));
    int x=rand()%5+1;
    int y;
    cin>>y;
    if(y==x){
        cout<<"中奖了"; 
    }else{
        cout<<"没中奖,中奖号码是:"<<x; 
    }
    return 0;
} 

 

posted @ 2023-05-13 18:52  fushuxuan1  阅读(21)  评论(0)    收藏  举报