Search

Solution Cart

Remove item Thumbnail image Product Price Quantity Subtotal
× - Three cats with names- Mia, Ruby and Snowy are playing Rock-Paper-Scissors. - Basic rules of the game are: Rock beats scissors, scissors beat paper, and paper beats rock. - Each cat gains 3.5 points per win, loses a point per match lost, and gains 1.5 points if a match is drawn. - A total of 5 matches were played between Snowy and Mia. Snowy threw rock, paper, and scissors while Mia threw scissors, paper, and rock in the first three matches. In the last 2 matches, both Snowy and Mia threw rock. - Mia and Ruby played 3 matches in which Ruby threw rock three times while Mia threw paper, rock, and scissors. - 7 matches were played between Snowy and Ruby. Snowy threw rock, scissors, rock, paper, paper, rock, scissors while Ruby threw scissors, rock, scissors, scissors, rock, paper, scissors respectively. - Interpret the above data to display/fill the table on the next page. - Instructions and Hints: - Display the column Match Number using string data type. - Display table headings using cout in C++ - Display columns with headings Gesture using string data type. Use the information provided above to fill these columns for each cat. - Create 2-D arrays for columns-Won, Lost and Draw. You are required to enter the number of points, not the no. of wins, loses, or draws under these columns. Use for loops and if-else statements to fill the information under these columns. - Create a sum function to calculate Points (=sum of Win, loss and draw per match) for each cat. - Create a mean function to calculate "Average" for columns- Won, Lost, Draw and Points. - Calculate Winning probability using the following formula. WinningProbability=TotalnumberofOutcomesNumberoffavourableOutcomes100 - PS: Calculations for -Won, Lost, Drawn and Winning Probability should be done using for loops, if-else statements. Calculation under Points and Average should be done using functions for 2D arrays. You may call a function for 2D arrays with or without using pointers! – Three cats with names- Mia, Ruby and Snowy are playing Rock-Paper-Scissors. – Basic rules of the… $15.00
$15.00
× Between a Rock and a Hard Place Given a string in a variable named text, write code that finds the substring that lies between the substring 'rock' and the substring 'hard place'. For example, if text contains 'here is a rock and here is a hard place', then the result would be ' and here is a'. Assign the result to a variable named between. Assume that text already has a value that contains the substrings 'rock' and 'hard place' in that order. Print the Longer String Write code that prints the longer of two strings that are stored in the variables str1 and str2. If both strings are equal in length, print the value of str1. Assume that both variables have already been given values. Print Product Id Write code that examines a string stored in a variable called product_id and prints an appropriate version of the id. If the id is composed of only numeric digits, print it as is. If it is composed of a combination of alphabetic letters and digits, print the id with all alphabetic letters in uppercase. Otherwise (if there are any other types of characters in the id), print it with all alphabetic letters in lowercase. Assume that the product id has already been initialized. Double Word Write code that constructs a string made up of each character in a string variable named word repeated twice. For example, if word contains 'Python', the resulting string would be 'PPyytthhoonn'. Store the constructed string in a variable called double_word. Assume that word has already been initialized. How Do You Spell That? Write code that produces a string made up of each character in a string variable named word separated by a dash. For example, if word contained the string 'Python', the resulting string would be 'P-y-t-h-o-n'. Do NOT include a dash after the last character. Store the resulting string in a variable named spell_string. Assume that the variable word has already been initialized. Generate Acronyms Given a phrase stored in the variable phrase, write code to construct an acronym made up of the first letter of each word in the phrase. For example, the phrase 'Portable Network Graphics' would produce the acronym 'PNG'. Store the result in a variable named acronym, ensuring that it is composed of all uppercase letters. Assume that there is no whitespace on either end of the phrase and that one space character separates each word. Back to Front Write code that constructs a string made by flipping the front and back halves of a string stored in a variable named flip_me. For example, if flip_me is 'bookmark', the resulting string is 'markbook'. Store the result in a variable named flipped. Assume that the variable flip_me has already been given a value and that it contains an even number of characters. Count It Write code that determines how many times the string 'it' appears in the character string stored in a variable named sentence. Store the result in the variable it_count. Assume that sentence has been initialized. Ideas and Thoughts Write code that prints a string made up of the string stored in the variable sentence with all instances of the word 'idea' replaced with the word 'thought'. Assume the sentence variable has already been initialized. Between a Rock and a Hard Place Given a string in a variable named text write code that finds the $5.00
$5.00

Cart totals

Subtotal $20.00
Total $20.00

You may be interested in…

Free Worldwide shipping

On all orders above $50

Easy 30 days returns

30 days money back guarantee

International Warranty

Offered in the country of usage

100% Secure Checkout

PayPal / MasterCard / Visa