C++第2

 1、

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b;
    cin>>a>>b;
    cout<<a/b<<" "<<a%b;
    return 0;
}

2、

#include<bits/stdc++.h>
using namespace std;
int a,b;
int main(){
    cin>>a>>b;
    cout<<(a+b)*2<<endl<<a*b;
    return 0;
}

3、

 
#include <stdio.h>
int main(){
    int n,s,min;
    scanf("%d",&n);
    s=n*24;
    min=24*60*n;
    printf("%d\n%d",s,min);
    return 0;
}

4、

 
#include <stdio.h>
int main() {
	int n,a,x,s;
	scanf("%d %d %d",&n,&a,&x);
	s=n-a*x; 
	printf("%d\n",s); 
	return 0;
}

5、

#include <stdio.h>
int main(){
    int x,y,n;
    float m,z;
    scanf("%d%d%d",&x,&y,&n);
    z=(x+y)*0.9;
    m=n-z;
    printf("%.1f",m);
    return 0;
}

6、

#include<iostream>
using namespace std;
int main()
{
   int n;
   cin>> n;
   
   cout <<n*3<< endl;
   
    
    
	
	   return 0;
}

7、

 
#include<iostream>
using namespace std;
int main()
{
   int x,y;
   cin>> x;
   cin>> y;
   cout <<y/x*5<< endl;
    
	
    return 0;
}

8、

#include<bits/stdc++.h>
using namespace std;
int main(){
	int m,n;
	cin>>m>>n;
	cout<<360/12*(n-m);
    
    return 0;
}

9、

#include<bits/stdc++.h>
using namespace std;
int main(){
	int m,n,a;
	cin>>m>>n>>a;
	cout<<m*(a/n);
    
    return 0;
}

10、

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c,d,s;
    cin>>a>>b>>c>>d;
    s=(c*60+d)-(a*60+b);
    cout<<s/60<<" "<<s%60; 
    
    return 0;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
C++ Templates第二版》是由David Vandevoorde和Nicolai M. Josuttis合著的一本关于C++模板的书籍。该书是对第一版《C++ Templates》的更新和扩展。C++模板是C++语言中一个非常重要的特性,它允许程序员编写泛型代码来处理不同类型的数据。 《C++ Templates第二版》深入讲解了模板的基本概念、语法和用法。书中介绍了模板的定义、实现和使用方法,并通过丰富的示例帮助读者理解和掌握模板编程的技巧。此外,书中还涵盖了模板元编程、模板特化以及模板的实现细节等高级主题。 与第一版相比,《C++ Templates第二版》在内容和范围上有所扩展。书中对C++11和C++14的新特性进行了详细的讲解,包括可变参数模板、类型别名模板、constexpr函数等。另外,该书还对模板的一些常见问题和陷阱进行了解释和说明,帮助读者避免在模板编程中常见的错误和困惑。 《C++ Templates第二版》着重强调了模板在现代C++编程中的重要性和应用。通过学习本书,读者可以深入了解模板的强大功能,提升自己的C++编程水平。无论是初学者还是有一定经验的C++程序员,都可以从中受益匪浅。 总之,《C++ Templates第二版》是一本全面而深入的关于C++模板的权威书籍,它涵盖了从基础知识到高级技巧的全部内容,对于想要深入学习和应用C++模板的人来说是一本非常有价值的参考书。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值