c++整数运算(1)
#include<iostream>
#include<iomanip>
using?namespace?std;
int?main()
{
????int?m,n;
????cin>>m>>n;
????int?cnt?=?0;
????for(int?i?=?n;m-n<n;i++)
????{
????????if(m-n>n)
????????{
????????????cnt++;
????????????m?=?m-n;
????????}
????}
????cout<<cnt<<endl<<n-m;
????return?0;
}
?
#include<iostream>
#include<iomanip>
using?namespace?std;
int?main()
{
????int?m,n;
????cin>>m>>n;
????cout<<(m+n)*2<<endl<<n*m;
????return?0;
}
?
#include<iostream>
#include<iomanip>
using?namespace?std;
int?main()
{
????int?n;
????cin>>n;
????cout<<n*24<<endl<<n*24*60;?
????return?0;
}
?
#include<iostream>
#include<iomanip>
using?namespace?std;
int?main()
{
????int?n,a,x;
????cin>>n>>a>>x;
????cout<<n-a*x;?
????return?0;
}
?
#include<iostream>
#include<iomanip>
using?namespace?std;
int?main()
{
????int?x,y,n;
????cin>>x>>y>>n;
????cout<<n-(x+y);?
????return?0;
}
?
#include<iostream>
#include<iomanip>
using?namespace?std;
int?main()
{
????int?n;
????cin>>n;
????cout<<n*3;?
????return?0;
}
?
#include<iostream>
#include<iomanip>
using?namespace?std;
int?main()
{
????int?n,m;
????cin>>n>>m;
????cout<<(m-n)*30;?
????return?0;
}
?
#include<iostream>
#include<iomanip>
using?namespace?std;
int?main()
{
????int?m,n,s;
????cin>>m>>n>>s;
????cout<<s/n*m;?
????return?0;
}
?
#include?<iostream>
#include?<cstring>
using?namespace?std;
int?main()
{
????int?a,b,c,d,e;
????cin>>a>>b>>c>>d;
????e?=?(c*60+d)-(a*60+b);
????cout<<e/60<<"?"<<e%60;
????
????return?0;
}
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!