c++一级练习题(1)

#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

int a,b;

cin>>a>>b;

cout<<a*b;

return 0;

}

#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

int a;

cin>>a;

if(a%1 == a)

{

cout<<"no";

}

else

{

cout<<"yes";

}

return 0;

}

#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

int n,k;

cin>>n>>k;

int sim;

for(int i = 0;i<=n;i++)

{

int g = i%10;

int s = i/10%10;

int b = i/100%10;

if(i/7 == 0||g == 7||s == 7||b == 7)

{

sim = sim + i;

}

}

cout<<sim;

return 0;

}

#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

int n;

cin>>n;

int sim;

for(int i = n;i<=0;i--)

{

for(int j = i;i<=0;j--)

{

if(i/j == 0)

{

sim = sim+i;

}

}

if(sim>=2)

{

cout<<i;

return 0;

}

else

{

sim = 0;

}

}

}

#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

int a,b;

cin>>a>>b;

cout<<b<<" "<<a;

}

相关推荐
云小逸1 小时前
【Nmap 设备类型识别技术】整体概况
服务器·c语言·网络·c++·nmap
梯度下降中1 小时前
求职面试中的线代知识总结
人工智能·线性代数·算法·机器学习
twj_one1 小时前
java中23种设计模式
java·开发语言·设计模式
SmartBrain1 小时前
OCR 模型在医疗场景的选型研究
人工智能·算法·语言模型·架构·aigc·ocr
梵刹古音1 小时前
【C语言】 跳转语句
c语言·开发语言·算法
liu****1 小时前
29.路径类dp
c++·算法·acm
JMchen1231 小时前
Android计算摄影实战:多帧合成、HDR+与夜景算法深度剖析
android·经验分享·数码相机·算法·移动开发·android-studio
阿猿收手吧!1 小时前
【C++】C++模板特化:精准定制泛型逻辑
开发语言·c++·算法
智驱力人工智能2 小时前
货车走快车道检测 高速公路安全治理的工程实践与价值闭环 高速公路货车占用小客车道抓拍系统 城市快速路货车违规占道AI识别
人工智能·opencv·算法·安全·yolo·目标检测·边缘计算
ghie90902 小时前
MATLAB中编写不平衡磁拉力方程
开发语言·matlab