c++一级练习题

#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;

}

相关推荐
高山上有一只小老虎5 分钟前
字符串字符匹配
java·算法
愚润求学39 分钟前
【动态规划】专题完结,题单汇总
算法·leetcode·动态规划
MOONICK1 小时前
数据结构——哈希表
数据结构·哈希算法·散列表
林太白1 小时前
跟着TRAE SOLO学习两大搜索
前端·算法
爱凤的小光1 小时前
图漾GM461-E1相机专栏
c++
ghie90901 小时前
图像去雾算法详解与MATLAB实现
开发语言·算法·matlab
云泽8081 小时前
从三路快排到内省排序:探索工业级排序算法的演进
算法·排序算法
qwepoilkjasd2 小时前
C++智能指针介绍
c++
weixin_468466852 小时前
遗传算法求解TSP旅行商问题python代码实战
python·算法·算法优化·遗传算法·旅行商问题·智能优化·np问题
·白小白2 小时前
力扣(LeetCode) ——43.字符串相乘(C++)
c++·leetcode