#2
md000000002022-08-09 23:58
|
随机生成5道10以内的加法题目,错误提示是: error: ‘end1’ was not declared in this scope
具体代码如下
#include<iostream>
#include<ctime>
#include<stdlib.h>
using namespace std;
int main()
{
srand(time(0));
cout<<rand()%10<<"+"<<rand()%10<<"="<<end1;
cout<<rand()%10<<"+"<<rand()%10<<"="<<end1;
cout<<rand()%10<<"+"<<rand()%10<<"="<<end1;
cout<<rand()%10<<"+"<<rand()%10<<"="<<end1;
return 0;
}