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]
2 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]2 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
You can invoke or call a method from another program or method. When methods must share data, you can pass the data into and ret
san4es73 [151]

Answer:

1. You can invoke or call a method from another program or method: TRUE

2. When methods must share data, you can pass the data into and return the data out of methods: TRUE

3. A method could be called using any numeric value as an argument, whether it is a variable, a named constant, or a literal constant: TRUE

Explanation:

4 0
3 years ago
Write a SELECT statement that returns these three columns: vendor_nameThe vendor_name column from the Vendors table default_acco
Sati [7]

Explanation:

"Select vendor_name as Vendor_Name,

default_account_number as Default_Account_No ,

account_description as Account_Description

From Vendors v, General_Ledger_Accounts ledger

where (add the join condition here)

Order by account_description, vendor_name"

Note: In the above statement, include the alias name appropriately and then execute the query

The "select statement" should contain the list of columns to be displayed

"From statement" should contain the name of the table from which data needs to be fetched.

"Where clause" defines the relationship as well the condition that needs to be executed

"Order by clause" defines the sorting mechanism with the relevant field

5 0
3 years ago
A series of drawn pictures (like a comic) of key visual shots of planned production for video is a/an
Ne4ueva [31]

Answer:

The correct answer is <u>D) Storyboard</u>

Explanation:

A storyboard is used during the initial planning stage of filmmaking. You draw pictures to demonstrate the general idea of what shots you want to get before actually going out and filming on a set/studio.

4 0
2 years ago
How do you insert a table by using standard toolbar?​
MissTica

Answer:

Click the Insert Table button on the Standard Toolbar. Drag over the grid that appears to select the number of rows and columns you want. To use automatic formatting, choose Table AutoFormat from the Table menu. Select several Formats from the menu on the left to see how the table will look.

5 0
2 years ago
Should spreadsheets be used to capture the results of a science experiment?<br><br> YES<br> NO
Lyrx [107]

Answer:

Yes

Explanation:

Spreadsheets should be used to capture the results of science experiments because they are good for sorting data. They make results easier and information easier to see and use.

3 0
1 year ago
Read 2 more answers
Other questions:
  • If a gas gosts 3.60 per gallon how much doe sit cost to drive 500 miles in the city
    5·1 answer
  • How would you say an hard drive works
    9·2 answers
  • Jerry is making an address book using a digital database. He has a list of his immediate family and friends but wants to add a f
    9·2 answers
  • Approximately what percent of desktop PCs are used for work-related purposes?
    13·2 answers
  • What was one of the first inventions that made it possible to communicate almost instantly?
    11·1 answer
  • How do I learn coding? Python
    5·2 answers
  • Write a Temperature class that will hold a temperature in Fahrenheit and provide methodsto get the temperature in Fahrenheit, Ce
    14·1 answer
  • What is a spreadsheet program?<br> A spreadsheet program is a computerized version of _______
    5·1 answer
  • Write a Python program string_functions.py that defines several functions. Each function re-implements Python's built-in string
    9·1 answer
  • What is output by the following code?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!