
Lv.1
开摆~
签名:课堂小测 周测 月测 大测 期中测 期末测 暑初测 暑中测 暑末测 寒初测 寒中测 寒末测 周年测 世纪测
在 【长期有效】投稿赚钱,嗨翻整个暑假。 中回复
#include<iostream>
#include<cstdio>
#include<cstring>
#include <stdlib.h>
#include <cstdlib>
#include <ctime>
#include<cmath>
using namespace std;
int a[100],b[100],n;
double cc[100],喵[100];
double p,e;
char l;
char ch,abc;
int main()
{
cout<<"1.计算"<<endl;
cout<<"2.练习口算"<<endl;
cout<<"3.关于" <<endl;
cout<<"4.退出"<<endl<<endl;
cin>>ch;
system("Cls"); //清屏
if(ch=='1')
{
/*while(l!='=')
{
cin>>p>>l>>e;
if(l=='+')
{
e=e+p;
}
if(l=='-')
{
e=e-p;
}
if(l=='*')
{
e=e*p;
}
if(l=='/')
{
e=e/p;
}
if(l=='=')
{
cout<<e;
}
}*/
cout<<"开发中...";
}
else if(ch=='2')
{
cout<<"a,简单(+-)"<<endl;
cout<<"b,普通(*/)"<<endl;
cout<<"c,困难(开方)"<<endl;
cin>>abc;
system("Cls");
cout<<"你要做几题?最多做100题。";
cin>>n;
system("Cls");
if(abc=='a')
{
int d,g=rand()%2,h=0,k=0,l[101],o;
for(int i=0;i<n;i++)
{
o=0;
if(g==1)
{
a[i]=rand()%500+1;
b[i]=rand()%500+1;
cout<<a[i]<<"+"<<b[i]<<"=";
cin>>l[i];
o=a[i]+b[i];
if(l[i]==o)
{
h=h+1;
cout<<endl<<"恭喜你,对了!";
}
else
{
k=k+1;
cout<<endl<<"真可惜,错了。";
}
cout<<endl<<endl;
}
if(g==0)
{
for( ; ;)
{
a[i]=rand()%500+1;
b[i]=rand()%499+1;
if(a[i]>=b[i]) break ;
}
cout<<a[i]<<"-"<<b[i]<<"=";
cin>>l[i];
o=a[i]-b[i];
if(l[i]==o)
{
h=h+1;
cout<<endl<<"恭喜你,对了!";
}
else
{
k=k+1;
cout<<endl<<"真可惜,错了。";
}
cout<<endl<<endl;
}
g=rand()%2;
}
if(h==0)
{
cout<<"对了:0题!"<<endl<<"错了:"<<o<<"题!"<<endl<<"下次加油!";
return 0;
}
else cout<<"对了:"<<h<<"题"<<endl<<"错了:"<<k<<"题"<<endl;
}
if(abc=='b')
{
int d,g=rand()%2,h=0,k=0,l[101],o;
long p,f[101];
for(int i=0;i<n;i++)
{
o=0;
p=0;
if(g==1)
{
a[i]=rand()%500+1;
b[i]=rand()%500+1;
cout<<a[i]<<"*"<<b[i]<<"=";
cin>>l[i];
o=a[i]*b[i];
if(l[i]==o)
{
h=h+1;
cout<<endl<<"恭喜你,对了!";
}
else
{
k=k+1;
cout<<endl<<"真可惜,错了。";
}
cout<<endl<<endl;
}
if(g==0)
{
for( ; ;)
{
a[i]=rand()%500+1;
b[i]=rand()%500+1;
if(a[i]>=b[i]) break ;
}
cout<<a[i]<<"/"<<b[i]<<"= ......";
cin>>l[i]>>f[i];
o=a[i]/b[i];
p=a[i]%b[i];
if(l[i]==o&&f[i]==p)
{
h=h+1;
cout<<endl<<"恭喜你,对了!";
}
else
{
k=k+1;
cout<<endl<<"真可惜,错了。";
}
cout<<endl<<endl;
}
g=rand()%2;
}
if(h==0)
{
cout<<"对了:0题!"<<endl<<"错了:"<<o<<"题!"<<endl<<"下次加油!";
return 0;
}
else cout<<"对了:"<<h<<"题"<<endl<<"错了:"<<k<<"题"<<endl;
}
if(abc=='c')
{
long long p=0,o=0,l[100];
srand(time(NULL));
for(int i=0;i<n;i++)
{
a[i]=rand()%10000+1;
cout<<a[i]<<"开方后=";
cin>>b[i];
l[i]=sqrt(a[i]);
if(b[i]==l[i])
{
cout<<endl<<"恭喜你!对了!";
p=p+1;
}
else
{
cout<<endl<<"真可惜!错了!";
o=o+1;
}
cout<<endl<<endl;
}
if(p==0)
{
cout<<"对了:0题!"<<endl<<"错了:"<<o<<"题!"<<endl<<"下次加油!";
return 0;
}
cout<<"对了:"<<p<<"题!"<<endl<<"错了"<<o<<"题";
}
}
else if(ch=='3')
{
cout<<"(2017)";
}
else if(ch=='4')
{
cout<<"谢谢使用";
}
return 0;
}2019-07-11T21:02:13 点赞:0
在 【咸鱼速递·1】协程 中回复
参考文章:http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/n4736.pdf
2019-07-13T10:33:55 点赞:0
在 啊啊啊啊啊啊啊啊啊啊!2.0代码岛咋黑屏了? 中回复
根据提示你关闭了WEBGL(3D绘图协议),导致代码岛无法建模,你的360安全浏览器我上网查了一下,暂不支持这个协议,换其他浏览器吧
2019-08-04T12:07:09 点赞:0