95 Answered Questions for the topic Software

Write a C++ program that allows a user to choose as many sides for a meal as they want (it’s an ‘all you can eat’ special!).

Assignment 2: Restaurant Choices Please include source code. Write a program that allows a user to choose as many sides for a meal as they want (it’s an ‘all you can eat’ special!). 1. Print out a... more

Transpose. Write code for the function transpose.

Write code for the function transpose. It should take the matrix given and produce the transpose by swapping rows and columns.For the matrix shown here: 1 2 3 4 5 6 7 8 9 Your code should... more

String Trim2. Write a function stringTrim that removes the first and last characters from a given string.

Write a function stringTrim that removes the first and last characters from a given string. "chello" should become "hell".Your function must work correctly given the code in main shown below.... more

Midpoint Finder. Write a function: void findMidpoint(double x1, double y1, double x2, double y2, double& xMid, double& yMid)

Write a function:void findMidpoint(double x1, double y1, double x2, double y2, double& xMid, double& yMid)Assume x1, y1 and x2, y2 represent two coordinates on a Cartesian plane. Calculate... more

All To Upper. Read a string from cin into word and modify it so that it has all uppercase letters.

Read a string from cin into word and modify it so that it has all uppercase letters.Samples: Input: hello Output: HELLO Input: h3Llo Output: H3LLO Hints: You can only change the code in the... more

Count E's. Read in a string, print out the number of e's in it.

Read in a string, print out the number of e's in it. Note that the string may have spaces in it. A call to getline looks like getline(cin, myVariable) where myVariable is a string variable that... more

Read Text. Write a program that reads one character at a time and prints them out without spaces until it hits a period. Do not print the period.

Write a program that reads one character at a time and prints them out without spaces until it hits a period. Do not print the period.Input of:H e l l o .should result in output... more

Squares Adder. Write a program that reads in a number (integer) indicating how many values you are to read.

Write a program that reads in a number (integer) indicating how many values you are to read. Then read in that many more numbers (all integers) and output the sum of their squares.Input of 4 1 2 3... more

Counting 3. Write a program that reads in two chars, like B and F and prints all the characters in that range in the format:

Write a program that reads in two chars, like B and F and prints all the characters in that range in the format:B,C,D,E,FHints: Your loop variable should be a char. Remember you can add one to a... more

Counting 2. Read in three numbers. A start value, an increment value, and an end value (all integers). Start counting from the start, adding the increment at each step...

Read in three numbers. A start value, an increment value, and an end value (all integers). Start counting from the start, adding the increment at each step, until you are at or above the end... more

Counting 1. Write a program that reads in a number, and writes out from 1 to that number. An input of 5 would produce 12345.

Write a program that reads in a number, and writes out from 1 to that number. An input of 5 would produce 12345.Code:#include <iostream>using namespace std;int main(){ //YOUR_CODE}

Cell Labeler. In a spreadsheet, the rows are numbered and the columns are lettered, like this:

In a spreadsheet, the rows are numbered and the columns are lettered, like this: ABC 1 A1 B1 C1 2 A2 B2 C2 The code below reads in a number of rows and columns. Prints out the cells that would... more

Triangle Printer 2. The existing code reads in a number and prints a series of rows. Modify it so it prints a triangle that looks like the ones shown below.

The existing code reads in a number and prints a series of rows. Modify it so it prints a triangle that looks like the ones shown below. SizeShape 1 *2 * ** 3 * ** *** 4 * ** ... more

Triangle Printer. The existing code reads in a number and prints a column of stars that many rows long. Modify it so that it prints a triangle that looks like the one shown below.

The existing code reads in a number and prints a column of stars that many rows long. Modify it so that it prints a triangle that looks like the one shown... more

Square printer. Read in an integer. Print a square of *'s that height and width. An input of 3 should produce:

Read in an integer. Print a square of *'s that height and width. An input of 3 should produce: *** *** *** An input of 5 should produce: ***** ***** ***** ***** ***** Code:#include... more

Catapult Calculator

Market research has indicated that the app store currently lacks a catapult calculator. Filling this void could be the get rich opportunity of a lifetime! Write a program that calculates whether a... more

Compilation is normally encapsulated so that all of the necessary steps happen behind the scenes. Type the following C code into a file named count.c.

CompilationCompilation is normally encapsulated so that all of the necessary steps happen behind the scenes. Type the following C code into a file named count.c.#include <stdio.h>#include... more

Log Switcher. Read in a number (double). Print the power of two that the number represents.

Read in a number (double). Print the power of two that the number represents.C++11 added a log base 2 function, but you can also just use the formula: power = log(number) / log(2) where log is the... more

Int Range. Read in a decimal value. Print out the two integers it is between, smaller value first, with exactly one space in between them.

Read in a decimal value. Print out the two integers it is between, smaller value first, with exactly one space in between them. If it is an integer value already, your program should print out the... more

Cos Finder. Read in an angle in degrees and the length of the adjacent side to that angle in a right triangle (both as doubles). Print the length of the hypotenuse of the triangle.

Read in an angle in degrees and the length of the adjacent side to that angle in a right triangle (both as doubles). Print the length of the hypotenuse of the triangle.Use the formula hypotenuse =... more

Tangent Angle Finding. Read in the opposite and adjacent sides for one of the acute angles in a right triangle (as doubles). Print the size of the angle in radians.

Read in the opposite and adjacent sides for one of the acute angles in a right triangle (as doubles). Print the size of the angle in radians.Use the rule angleX = atan(opposite/adjacent) to find... more

Vowel Checker. Read in a character. Print vowel if it is a vowel (a, e, i, o, u, A, E, I, O, U) or consonant if it is not.

Read in a character. Print vowel if it is a vowel (a, e, i, o, u, A, E, I, O, U) or consonant if it is not.Hint: a nice trick to simplify your logic is to first convert the input to... more

04/12/21

Next Two Letters. Read in a character (it will always be a lower case letter). Print out the two letters that come after it without any spaces. Once you go past 'z' you should wrap back to 'a'.

Read in a character (it will always be a lower case letter). Print out the two letters that come after it without any spaces. Once you go past 'z' you should wrap back to 'a'.Hint: You can add... more

04/12/21

Char Sorter. Write a program that sorts chars into 1 of 3 groups.

Write a program that sorts chars into 1 of 3 groups. Letters A-J are in group 1, K-P in group 2, Q-Z in group 3. You should read in one character and print out the group it belongs in - assume the... more

04/05/21

C++. Write a program that reads three integers from cin and outputs them in order from smallest to largest.

C++.Write a program that reads three integers from cin and outputs them in order from smallest to largest.Example: input of 3 8 5 should result in output of:3 5 8Hints: You do not have to actually... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.