两种语言都有,挺简单的
2026-08-10 21:56:08
发布于:广东
1阅读
0回复
0点赞
没啥可说的,就直接把算式放到输出里输出就行了
这里给出python的代码和C++的代码
C++版
用cstdio库
#include<cstdio>
//using namspace std;可以不写
int main(){
printf("%d\n%d\n%d\n",123*456,356*234,777*999);
return 0;
}
用这种方法的运行速度会比iostream的运行速度会快很多
用iostream库
#include<iostream>
using namespace std;
int main(){
cout<< 123*456<< endl;
cout<< 356*234<< endl;
cout<< 777*999;
return 0;
}
python版
print (123*456)
print (356*234)
print (777*999)
这里空空如也







有帮助,赞一个