fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. void escrevevogais(char s[50], int i) {
  6. if (s[i] == 0) return;
  7. escrevevogais(s, i + 1);
  8. if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u') {
  9. printf("%c", s[i]);
  10. }
  11. }
  12.  
  13. int main() {
  14. char s[50];
  15. fgets(s, 50, stdin);
  16. escrevevogais(s, 0);
  17. }
Success #stdin #stdout 0s 4288KB
stdin
aeiou programa
stdout
aaouoiea