#include <stdio.h> #include <string.h>

void printYuan(char s[]) { printf("元音字母有:"); for (int i = 0; s[i] != '\0'; ++i) { if(s[i] == 'A' || s[i] == 'a' || s[i] == 'E' || s[i] == 'e' || s[i] == 'I' || s[i] == 'i' || s[i] == 'O' || s[i] == 'o' || s[i] == 'U' || s[i] == 'u') { printf('%c ', s[i]); } } printf("\n"); }

int main() { char a[32] ={"abcdef"}; printYuan(a); return 0; }

C语言代码示例:识别并打印元音字母

原文地址: https://www.cveoy.top/t/topic/ndah 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录