subject

// Write a program to prompt a user for 3 values and store the values in 3 different strings. // The first string should store the first and last name, second string a number to be added, the 3rd string another number to be added.
// Multiply the 1st number by the 2nd number and display the results.
// Run 1: "John Doe", "60", "5".
// Run 2: "Mary-Jane Anon", "1212.65", "345.88"
#include using namespace std; int Compute(int val1, int val2, int val3) { int numbers[3]; numbers[0] = val1; numbers[1] = val2; numbers[2] = val3; int result = 0; int i; for (i = 0; i < 3; ++i) { result += numbers[i] - 2; } return result; } int main() { int value1 = 3; int value2 = 4; int value3 = 2; int computedValue; computedValue = Compute(value1, value2, value3); cout << computedValue << endl; return 0; }
//This is my code. I can't quite get it right. I'm trying to implement c-string, but I don't think Im doing/using it correctly. And after entering the second value, it just goes straight to the multiplication part and skips the prompt for the third value. Also, I don't quite understand what it meant "The first string should store the first and last name, second string a number to be added, the 3rd string another number to be added."

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
I'll mark brainliest if answered right! with which feature or menu option of a word processing program can you make an image like this? you can get this image using the option of a word processing program.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
While inserting images, the picture command is usually used to insert photos from a digital camera, and the clip art command is usually used to a.edit the sizes and other characteristics of photos that have been inserted. b.take a screenshot of an image and copy it to the clipboard for pasting. c.search for drawings or other images from a library of prepared pictures. d.make illustrations using lines and shapes that are easy to manipulate.
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
Write an expression that will cause the following code to print "equal" if the value of sensorreading is "close enough" to targetvalue. otherwise, print "not equal". ex: if targetvalue is 0.3333 and sensorreading is (1.0/3.0), output is:
Answers: 1
You know the right answer?
// Write a program to prompt a user for 3 values and store the values in 3 different strings. // Th...
Questions
Questions on the website: 13722360