1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
LenaWriter [7]
3 years ago
9

Written Hawaiian also has fairly simple spelling rules for determining if a word is a valid word in the language (even if the me

aning is unknown). They are: All words contain only vowels and Hawaiian consonants. All words end in a vowel. Within a word, two consonants NEVER appear adjacent. Write a program which reads lines of Hawaiian text from a file (using redirection, so you will not need to prompt), and lists each word found on a separate line indicating whether it is a valid Hawaiian spelling or it is invalid. Any non-letter characters (e.g. white space or punctuation characters) in the file should be treated as delimiters, but otherwise ignored and not appear in the output. You should think about your algorithm before beginning to code this function, and you might want to look at the program wds.c from lecture (and on wiliki in ~ee160/Code.lect/Chars/wds.c) for guidance. (That file is similar, but better, than the code in Chapter 4). The general algorithm for your program will be similar to the word counting program, but the details will vary. Implement your algorithm in the file spchk.c and use the functions in letters.c to test for the appropriate letters. (Hint: You might want to write another function similar to delimitp() used in wds.c, but your code will be different from the delimitp() in the text. You can put any additional functions and/or macros you use in your letters.c and letters.h files).
Computers and Technology
1 answer:
Naya [18.7K]3 years ago
5 0

Answer:

see explaination

Explanation:

#include<stdio.h>

#include <conio.h>

#include <ctype.h>

bool ishawaiian(char,int *);

int main()

{bool legal=true;

char ch;

intlast_ch=0,i;

char inword[20];

int kt=0,voc,done;

while((ch = getchar()) != EOF)

{inword[kt++]=ch;

if(ishawaiian(ch,&voc))

{if(voc==1)

if(kt!=1)

if(last_ch==1)

legal=false;

last_ch=voc;

}

else

{if(voc=3&&!(isspace(ch)||ispunct(ch)))

{legal=false;

done=0;

while(done==0)

{ch = getchar();

if(!(isspace(ch)||ispunct(ch)))

inword[kt++]=ch;

else

{done=1;

kt++;

}

}

}

kt--;

printf("\n");

for(i=0;i<kt;i++)

printf("%c",inword[i]);

if(legal)

printf(": it isvalid\n");

else

printf(": it isinvalid\n");

legal=true;

kt=0;

}

}

getch();

return 0;

}

bool ishawaiian(charch,int* voc)

{charletter[13]={'a','e','i','o','u','h','k','l','m','n','p','w','\''};

int i;

for(i=0;i<13;i++)

{if(ch==letter[i])

{if(i<5)

*voc=0;

else

*voc=1;

returntrue;

}

}

*voc=3;

return false;

}

You might be interested in
How does the technology work
Ivan

Answer:  it does – or perhaps appears to do – in the world.

Explanation:

sorry if am not right have a nice day lol

6 0
3 years ago
Read 2 more answers
This component is responsible for the logical order of processing?
Svetradugi [14.3K]

Answer:

A) ALU

Explanation:

The arithmetic logic unit (ALU) performs the arithmetic and logical functions that are the work of the computer.

So, the correct option is - A) ALU

6 0
3 years ago
How to select multiple lines in mysql workbench and right shift
Alekssandra [29.7K]

Answer:

I'dont really know the answer

4 0
2 years ago
Which of the following is not a valid FICO Credit score?
kumpel [21]

Answer: C 475

Explanation:  These choices are A. 375, B. 276, and D. 575. so that wolde mean it would be C 475.

8 0
3 years ago
Read 2 more answers
Which of the following items are typically included in a balanced budget A. The amount you earn in income
taurus [48]
D is the correct answer

8 0
3 years ago
Other questions:
  • Prompt the user for a string that contains two strings separated by a comma. (1 pt)Examples of strings that can be accepted:Jill
    5·1 answer
  • How can u refer to additional information while giving a presentation
    15·1 answer
  • The ListIterator interface
    13·1 answer
  • What is the term used for the document that describes the scenes and sequence of a game?
    6·1 answer
  • What differentiates physical design from logical design?
    7·1 answer
  • Give five functions of Windows​
    15·1 answer
  • How does the text recommend that a company operate if it wants to be successful in the information age?
    11·1 answer
  • A style sheet consists of CSS ______________________ that specify the layout and format properties to apply to an element. *
    13·1 answer
  • Why is the Microsoft website considered the best source for information about pagefile.sys?​
    15·1 answer
  • 3. is the system of rules that govern the ordering of values? culture a. Ethics b. organization c. protocol d. value system 3 .
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!