2018.12.7acm第一题

#include

using namespace std;

void delet(char a[], char b[]);

int main()

{

char a[120];

char b[] = "AOYEUIaoyeui";

gets_s(a, 120);

delet(a, b);

char c[250];

int j = 0;

if (a[0] == '\0')

cout << '\0';

else

{

for (int i = 0; a[i] != '\0'; i++)

{

for (; j <(i+1) * 2; j++)

{

if (j % 2 == 0)

c[j] = '.';

else

c[j] = a[i];

if (a[i + 1] == '\0')

c[j + 1] = '\0';

}

}

for (int u = 0; c[u] != '\0'; u++)

{

cout << c[u];

}

}

system("pause");

}

void delet (char a[],char b[])

{

int j = 0;

for (int i = 0; a[i] != '\0'; i++)

{

int k = 0;

for (int o = 0; b[o] != '\0'; o++)

{

if (a[i] != b[o])

{

a[j] = a[i ];

}

else

k++;

}

if(k==0)

j++;

}

a[j] = '\0';

for (int i = 0; a[i] != '\0'; i++)

{

if (a[i] >= 65 && a[i] < 97)

a[i] = a[i] + 32;

}

}

你可能感兴趣的:(2018.12.7acm第一题)