大小写转换函数
tolower(char c);//转小写
toupper(char c);//转大写
上述函数如果传入参数已经是大写或小写了或者是其他字符那么将保持不变
字母判断
isalpha(char c);
如果是字母输出true;
如果不是字母输出false;
数字判断
isdigit(char c);
数字或字母判断
isalnum(char c);
cout输出两位小数
直接上例子
#include<iomanip>
#include<iostream>
int main()
{
float = 1.20;
cout.setf(ios::fixed);
cout << "a=" <<fixed<< setprecision(2) << a <<endl; //输出a=1.20
cout.unsetf(ios::fixed);
cout << "a=" << setprecision(2) << a <<endl; //输出a=1.2
return 0;
}