#include <stdio.h>

#define MAXLEN 80

int count_num(char *);
int count_up(char *);
int count_low(char *);

int main(void){
	char string[MAXLEN + 1];
	
	printf("文字列を入力してください : ");
	scanf("%80s", string);
	
	printf("文字列に含まれる数字の数%d", count_num);
	printf("文字列に含まれる大文字の数%d", count_up);
	printf("文字列に含まれる小文字の数%d", count_low);
	
	return(0);
}

int count_num(char *str){
	int count = 0;
	
	for( ; *str != '\0'; str++){
		if((*str >= '0') && (*str <= '9')){
			count++;
		}
	}
	
	return(count);
}

int count_up(char *str){
	int count = 0;
	
	for( ; *str != '\0'; str++){
		if((*str >= 'A') && (*str <= 'Z')){
			count++;
		}
	}
	
	return(count);
}

int count_low(char *str){
	int count = 0;
	
	for( ; *str != '\0'; str++){
		if((*str >= 'a') && (*str <= 'z')){
			count++;
		}
	}
	
	return(count);
}