C语言编程 输入一个字符,判断它是大写字母,小写字母数字还是其他字符
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/10 07:03:42
#includeintmain(void){intn,i=1,j,a;charc;printf("Pleaseinput:");scanf("%c,%d",&c,&n);for(i=1;i
#include"stdio.h"#include"math.h"main(){inti,n,flag=1;printf("PleaseInputanumber:");scanf("%d",&n);f
#include#includevoidmain(){printf("请数输入一个字符:");charch=getchar();if(ch>='a'&&ch='A'&&ch='0'&&ch
下面这句有错:for(i=0;i
楼上那个不能统计空格个数,我这个可以#include#includeintmain(){intcnt_c=0,cnt_n=0,cnt_o=0;charch;while(ch=getchar(),ch!
inti=2123;intone,two,three,four;one=i%10;//各位two=(i/10)%10;//十位three=(i/100)%10;//百位four=(i/1000)%10
#includevoidmain(){charline[30];inti,count1=0,count2=0,count3=0,count4=0;printf("\n请输入一行字符:");gets(l
#includeintmain(){inti;voidfun(inta);printf("输入数字:");scanf("%d",&i);fun(i);return0;}voidfun(inta){if
#include "stdio.h"main(){ char s[81],c; int i,j=0,num=0,word=0;&n
charch;scanf("%c",&ch);printf("%c\n",ch+1);
#include#includeintmain(){printf("请输入一个正整数:");intn1,n2;boolflag1=false,flag2=false;scanf("%d",&n1);n
#includevoidmain(){inti,j,k,m;printf("inputdata:");scanf("%d",&m);/*输入一个3位数*/i=m/100;j=(m-100*i)/10;
#include <stdio.h>#include <math.h>int main(void){  
#includeintmain(){intnum;inta;//百位intb;//十位intc;//个位scanf("%d",&num);a=num/100;//默认强制转为整型b=(int)(num
#includevoidmain(){\x09intyear;\x09printf("请输入年份:");\x09scanf("%d",&year);\x09if((year%4==0&&year/10
#include"stdio.h"main(){intx;printf("请输入一个整数");scanf("%d",&x);if(x%2==0)printf("%d是偶数\n",x);elseprin
#include"stdio.h"voidmain(){charch;scanf("%c",&ch);if(ch>='0'&&ch='a'&&ch='A'&&ch
#include#includevoidmain(){\x09intn,i;\x09scanf("%d",&n);\x09if(n==1)\x09{\x09\x09printf("1isnothing
# include <stdio.h>void main(){ char ch;  
intmain(){charc;scanf("%c",&c);if(c=="a"||c=="e"||c=="i"||c=="o"||c=="u"||c=="A"||c=="E"||c=="I"||c=