Hi,
I am having serious trouble writing the code for an assignment I am working on. I am a C# beginner and any help would be much appreciated thank you.
The question is:
The ancient Egyptians wrote in hieroglyphics, in which vowel sounds are not represented, only consonants. Is written English generally understandable without vowels? To experiment, write a function isvowel ( ) that tests whether or not a character is a vowel. Use your function in a program that reads the standard input file and writes to the standard output file, deleting all vowels. Use redirection on a file containing some English text to test your program.
what I have so far which is probably all wrong is:
again any help is EXTREMELY appreciated thank you
I am having serious trouble writing the code for an assignment I am working on. I am a C# beginner and any help would be much appreciated thank you.
The question is:
The ancient Egyptians wrote in hieroglyphics, in which vowel sounds are not represented, only consonants. Is written English generally understandable without vowels? To experiment, write a function isvowel ( ) that tests whether or not a character is a vowel. Use your function in a program that reads the standard input file and writes to the standard output file, deleting all vowels. Use redirection on a file containing some English text to test your program.
what I have so far which is probably all wrong is:
Code:
#include <stdio.h> #include <ctype.h> int isvowel(int ch); int main (void) { int c; while (isspace(c = getchar()) != EOF && c != '\n') if (isvowel(c) == 1){ putchar(c); } return 0; } int isvowel(int ch) { if (ch != 'A' || ch != 'a' || ch != 'E' || ch != 'e' || ch != 'I' || ch != 'i' || ch != 'O' || ch != 'o' || ch != 'U' || ch != 'u') return 1; return 0; }
Comment