网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  C++primer plus第六版课后编程题答案8.5

C++primer plus第六版课后编程题答案8.5

分类: IT文章 • 2025-01-30 09:15:25

8.5

#include <iostream>
using namespace std;
template <typename AnyType>
AnyType max5(AnyType arr[5])
{
	AnyType max=0;
	for(int i=0;i<5;i++)
	{
		if(arr[i]>max)
			max=arr[i];
	}
	return max;

};
void main85()
{
	int a[5]={10,20,50,6,33};
	double b[5]={5.2,3.5,6.7,8.8,4};
	cout<<"the amax is "<<max5(a)<<endl;
	cout<<"the bmax is "<<max5(b)<<endl;
	system("pause");


}


相关推荐

  • C++primer plus第六版课后编程题答案7.10
  • C++primer plus第六版课后编程题答案
  • C++primer plus第六版课后编程题答案8.3
  • C++primer plus第六版课后编程题答案8.2
  • C++primer plus第六版课后编程题答案8.1
  • C++primer plus第六版课后编程题答案9.1
  • C++primer plus第六版课后编程题答案8.8
  • C++primer plus第六版课后编程题答案8.5
  • 求C++Primer Plus(第六版)中文版 的课后答案(非常感谢),该如何处理
  • 求C++Primer Plus(第六版)中文版 的课后答案(非常感谢),该怎么处理
  • C语言练手自己编写学生成绩管理系统
  • 【C#开发中常用方法】Cookie的存取
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号