c=getchar()和gets©的区别
法一:
#include<stdio.h>
#include <stdlib.h>
int main(){
int i=0,j=0,k=0,l=0;
char c;
printf("请输入一行字符:\n");
c=getchar();
while(c!='\n'){
if(c>='a'&&c<='z'||c>='A'&&c<='Z') i++;
c=getchar()和gets©的区别
法一:
#include<stdio.h>
#include <stdlib.h>
int main(){
int i=0,j=0,k=0,l=0;
char c;
printf("请输入一行字符:\n");
c=getchar();
while(c!='\n'){
if(c>='a'&&c<='z'||c>='A'&&c<='Z') i++;