我试图通过将所有辅音放入不同的数组然后将第一个数组重新初始化为第二个数组来删除字符串的所有元音.之后,应该打印第一个数组,即只有辅音.我真的不确定问题出在哪里,我一直在看这个问题好三个小时,我已经厌倦了.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char str [100];
char garbage[100];
int loopcondition = 0 , j = 0 , k = 0;
int userinput;
char a = "a" , e = "e" , i = "i", o = "o" , u = "u";
printf("!!!Hello World!!! Please type in a string from which I can remove all the vowels:\n");
//This program is supposed to take in a string and then delete all the vowels
gets(str); //gets …Run Code Online (Sandbox Code Playgroud)