computer sicence C++

Americans spell differently from Canadians. Americans write "neighbor" and "color" while Canadians write "neighbour" and "colour”. Write a program to help Americans translate to Canadian. Your program should interact with the user in the following way. The user should type a word (not to exceed 64 letters) and if the word appears to use American spelling, the program should echo the Canadian spelling for the same word. If the word does not appear to use American spelling, it should be output without change. When the user types "quit!" the program should terminate.
The rules for detecting American spelling are quite naive: If the word has more than four letters and has a suffix consisting of a consonant followed by "or", you may assume it is an American spelling, and that the equivalent Canadian spelling replaces the "or" by "our". Note : you should treat the letter "y" as a vowel.
Keyboard input and screen output is expected.
Sample session. User input in italics.
Enter words to be translated:
color
colour

  1. 👍 0
  2. 👎 0
  3. 👁 61
asked by Riana

Respond to this Question

First Name

Your Response

Similar Questions

  1. stats

    Suppose that 20% of Canadians smoke. In a random sample of 20 Canadians, find the probability that more than 1 smokes

    asked by alf on November 10, 2013
  2. essay

    So I have to write an argumentative essay on Canadians peacekeeping in foreign countries (Cyprus, Rwanda, Somalia, Bosnia, Croatia) and I have to argue whether Canadians should or shouldn't be peacekeeping in foreign countries. I

    asked by mathew on May 29, 2011
  3. Data

    Three Canadians, 4 Americans, and 2 Mexicans attend a trade conference. In how many ways can they be seated in a row if the people of the same nationality are to be seated next to each other?

    asked by Katie on November 13, 2016
  4. us history

    Native Americans moved from lands where they had lived for a long time. Which of the following statements best explains the reason for this change? Native Americans hunted differently once they had access to guns. Native Americans

    asked by Labbayk on January 10, 2016
  5. Socials

    What does Mcdonald tell citizens of his proposed confederation would call themselves? Would this be a selling point for French - Canadians? Explain ur answer.....' He said they would call themselves Americans, and I don't get the

    asked by Sara on March 14, 2011
  6. Cultural Diversity

    I am once again looking for credible resources...I need a resource for the political,social, economic, and familial conventions(norms) or statuses of Mexican-Americans, Puerto Ricans, Cuban-Americans, and Colombian-Americans. I

    asked by sassy on June 19, 2011
  7. eth 25

    Subordinate Groups: Native Americans, African Americans, Chinese Americans, Japanese Americans, Arab Americans, Filipino Americans, Korean Americans, Vietnamese Americans, Asian Indians, Hawaiians, Irish Americans, Polish

    asked by redrose on May 28, 2008
  8. Journal Entry of a Subordinate Group Member

    Subordinate Groups: Native Americans, African Americans, Chinese Americans, Japanese Americans, Arab Americans, Filipino Americans, Korean Americans, Vietnamese Americans, Asian Indians, Hawaiians, Irish Americans, Polish

    asked by STEPH on August 26, 2007
  9. stats

    This past summer the LifeSaving Society did a survey about who was at risk in the water, with the goal of reducing swimming accidents. (Globe and Mail July 15 2010) Consider a similar study done that shows that 96 % of those born

    asked by az on October 2, 2010
  10. health

    Which one of the following groups has the highest incidence of diabetes in the U. S.? Hispanic Americans Native Americans Asian Americans White Americans I think it's white americans, but i'm not sure

    asked by brian on December 14, 2018

More Similar Questions