C++ CODING

进行中 已发布的 Oct 12, 2014 货到付款
进行中

In a container of candies there are 5 colors randomly placed: red, yellow,

green, black and blue. Assume that the container holds a maximum of 25

candies. Use a stack program to simulate randomly placing some (between 10

and 25 candies) initially into the container (stack). this is interactive

Now once that is done have the "user" choose a color and using ONLY stack

functions remove all candies of that color. All candies in the container (stack)

that are NOT of that color are returned to the candy in the same order they

were in prior to the color removal. Actually loop the program twice to

simulate "filling" and "removing" two sets of candies. Don't assume that

there are necessarily all colors of candy all the time...so for example someone

might want all red candies but there might not be any red candies at that time.

Fill the container (or partially fill) only ONCE for each run. Here is an example:

Suppose you place candies in this order:R R Y B G R B

Y B G Y R BL B G

Then the stack would look like this:

BL

G (top of stack)

If you asked to remove all green the resulting stack would be:

R

R

Y

B

R

B

Y

B

Y

R

BL

B(top of stack)

2. Write a program using stacks that tests whether or not a word, expression

or number is a palindrome. A palindrome is a word or expression that reads

the same forwards and backwards. (ignore punctuation and blanks) Test at

least 10 phrases and words. Be sure to label any palindromes as numeric

or string in the output. Make sure it works for more than just words

and you MUST use stacks! Also if a word is not a palindrome, see if the

program can make it one....example: “hello” is not a palindrome but

“hellolleh” is!

Examples of palindromes:

radar

Able was I ere I saw Elba

Madam I’m Adam

racecar

1991

2002

C++编程

项目ID: #6578354

关于项目

3个方案 远程项目 活跃的Oct 12, 2014

有3名威客正在参与此工作的竞标,均价₹318/小时

sachitjani81

A proposal has not yet been provided

₹277 INR / 小时
(8条评论)
3.9
rainbow

A proposal has not yet been provided

₹277 INR / 小时
(1条评论)
2.4
francklenormand

Hello, I'm a French Engineer and I'm looking for interesting projects on Internet. I'm skilled in C/C++ programming. Hence, I will be able to help you. Regards, Franck

₹400 INR / 小时
(0条评论)
0.0