没事
2025-03-21 16:22:45
发布于:浙江
#include <bits/stdc++.h>
using namespace std;
int main(){
srand(time(NULL));
int a=rand()%100;
int b=rand()%100;
cout<<a<<"+"<<b<<"=";
int res=0;
cin>>res;
cout<<"您的答案为:"<<res<<endl;
int rightAnswer=a+b;
if(res==rightAnswer){
cout<<"恭喜您,答案正确!"<<endl;
}else{
cout<<"非常遗憾,再接再励!";
}
return 0;
}
这里空空如也
有帮助,赞一个