#include<stdio.h>
int main() {
	char a[256] ="\0";
	gets(a);
	int i = 0, count = 0;
	while (a[i]) {
		if (48 <= a[i] && a[i] <= 57)count++;
		i++;
	}
	printf("%d", count);
	return 0;
}
                1103统计数字字符
最新推荐文章于 2025-10-31 14:17:08 发布
          
          
       
          
       
      
本文介绍了一个C语言程序,通过`gets`函数获取用户输入,并使用while循环计算输入字符串中ASCII值在48到57之间的数字字符数量。
          
                  
                  
                  
                  
                            
      
          
                
                
                
                
              
                
                
                
                
                
              
                
                
              
            
                  
					1244
					
被折叠的  条评论
		 为什么被折叠?
		 
		 
		
    
  
    
  
            


            