C/C++库函数

≯℡__Kan透↙ 提交于 2020-03-08 17:59:33

C/C++库函数-2020-3-8

函数名 函数模型 功能 返回值 头文件
abs int abs(int x) 求整数x的绝对值 计算结果 #include <stdlib.h>#include <cstdlib>
fabs double fabs(double x) 求x的绝对值 计算结果 #include <math.h>
islower int islower(int ch) 检查ch是否小写字母 是,返回1,否,返回0 #include <ctype.h>#include<cctype
cos double cos(double x) 计算cos(x) 计算结果 #include <math.h>
pow double pow(double x,double y) 计算xy的值 计算结果 #include <math.h>
rand int rand(void) 产生随机数 随机整数 #include <stdlib.h>#include <cstdlib>
toupper int toupper(int ch) 将ch字符转换成大写字母 与ch相应的大写字母 #include <ctype.h>#include<cctype
strlen unsigned int strlen(char *str) 统计字符串str中字符个数 返回字符个数 #include <string.h>#include <string>
max 求最大值 返回最大值
min 求最小值 返回最小值
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!