介绍一个自编头文件
  • 板块学术版
  • 楼主drachess
  • 当前回复2
  • 已保存回复2
  • 发布时间2023/11/18 21:55
  • 上次更新2023/11/18 22:00:09
查看原帖
介绍一个自编头文件
1122851
drachess楼主2023/11/18 21:55
/*
This is part of Drachess Pan 's header libary.
You can see it if you want, but only copy it when you are allowed by me.
If you want to change or copy it, tell me.
*/
#ifndef PANMATH_H
#define PANMATH_H
#include<cmath>
//it's about the high level math.
bool isprime(int a){
	if(a<=1)return 0;
	for(int i=2;i*i<=a;i++)
		if(a%i==0)return 0;
	return 1; 
}
int pytha(int a,int b){
	return sqrt(a*a + b*b);
}
#endif

一些规则在注释里已经说明。

如想了解更多,请在讨论区向我提问。

请严格遵守规则。

2023/11/18 21:55
加载中...