ARP ARP LANGUAGE

Introduction
ARP ARP Talk is a fun variation of the English language. The conversion to ARP ARP is carried out as follows:
1. When a vowel or vowel sound (a, e, i, o, u, or y as in why) is found, arp is placed in front of it.
2. Two or more vowels together are treated as one.
3. If a vowel or vowel sound occurs as the final letter of a word, it is only given an arp if it is the only vowel or vowel sound in the word.

Examples
fish becomes farpish
Harry becomes Harparry
Condition becomes carpondarpitarpion
Problem
Write a program which will convert an English sentence into Arp Arp language.
Input
A string or sentence terminated by the end-of-line character.
Output
The string or sentence converted to arp arp talk.
Input Validation
None. The input will always be a valid English sentence/phrase.

Sample Run
Why was I really unconscious while the avalanche roared all about me?
Wharpy warpas arpI rarpeally arpuncarponscarpious wharpilarpe tharpe arpavarpalarpancharpe rarpoararped arpall arpabarpout marpe?

Recommended Answers

All 15 Replies

How far have you got? Are you able to take in a sentence from the user?

nope not yet. i just need the codes where you can put the "arp" WORD inside the words, or in each string. can you help?

can you give me an example on how to put the insert letter? for example fish will become farpish... how can you insert the arp in it?

#include<iostream>
#include <string>

using std::cout;
using std::endl;
using std::string;

int main ()
{
  std::string str("fish");
  str.insert(1,"arp");
  cout << str << endl;
}

That shows you how to use insert. The rest really should be up to you.

THANK YOU SO MUCH! THIS WAS A GREAT HELP!

excuse me... sorry to bother you again, how would you insert 2 or more arp in one letter, for example cutting become carputtarping ... pls help.

Insert arp at position 1.
Then insert arp at position 7.

how will you put that in the code?

Member Avatar for iamthwee

Careful Moschops, he's tricking you into do the whole thing eventually.

To the OP, if you've taken a course in programming, the entire point is to get you to think and come up with solutions. At the moment you have a problem, have you taken the time out to write down on paper how you would go about solving it, or have you just jumped into your IDE.

I putting 2-1 odds on it being the latter.

So, stop what you are doing get out a piece of paper and a pen and draw yourself a flow chart.

Step through what the question is asking and what you would do for each condition.

hey iamthwee, im sorry, i do not intend to trick moschops. i just need help. i really need to know. i suck at programming, but it is my responsibility to finish this. pls help me. im almost done, but i just dont know how to insert the "arp" two times in a single string. im so sorry. pls believe. im almost done, moschops is a really great help for me. pls help me.

i just dont know how to insert the "arp" two times in a single string

Insert in once, and then insert it once.

guys plss... believe me. i really need your help.

i got it!!! thanks! suzie.

1 last thing, I would start from right to right to left.
that should mean you only have to calculate vowel positions once.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.