C/C++库函数

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 求最小值 返回最小值
发布了91 篇原创文章 · 获赞 101 · 访问量 3304

猜你喜欢

转载自blog.csdn.net/weixin_41096569/article/details/104732089