标签:style blog color os io ar div amp
//1、学习到字符输入 //2、判断字符 #include<iostream> using namespace std; int main() { char a; cout<<"please input a charcter: "<<endl; cin>>a; if(a>‘0‘&&a<‘9‘) { cout<<"it‘s a numerical character!"<<endl; }else { cout<<"it‘s not a numerical character!"<<endl; } return 0; }
43.编写一个程序,判断用户输入的字符是否是数字,若是数字,则输出“a numerical character”,布布扣,bubuko.com
43.编写一个程序,判断用户输入的字符是否是数字,若是数字,则输出“a numerical character”
标签:style blog color os io ar div amp
原文地址:http://www.cnblogs.com/jixiaowu/p/3898964.html