Asked by poohboi
Create a program that uses the preceding formula and displays the result, but this time, prompt the user for the values a, b, x, and y. Use appropriate variable names and naming conventions.
Answers
Answered by
jolly rancher
not enough info, but . . .
formula: result = (a + b)x - y (for example)
prompt["Please enter the value for x:"]
x = (input from user)
prompt["Please enter the value for y:"]
y = (input from user)
prompt["Please enter the value for a:"]
a = (input from user)
prompt["Please enter the value for b:"]
b = (input from user)
calculate[(a + b)x - y]
Display["Result is:", result]
formula: result = (a + b)x - y (for example)
prompt["Please enter the value for x:"]
x = (input from user)
prompt["Please enter the value for y:"]
y = (input from user)
prompt["Please enter the value for a:"]
a = (input from user)
prompt["Please enter the value for b:"]
b = (input from user)
calculate[(a + b)x - y]
Display["Result is:", result]
Answered by
Poohboi
That was the second part this what it say first which got the first part but this is the full saying
Given a = 5, b = 1, x = 10, and y = 5, create a program that outputs the result of the formula f = (a – b)(x – y) using a single printf() function.
2.Create a program that uses the preceding formula and displays the result, but this time, prompt the user for the values a, b, x, and y. Use appropriate variable names and naming conventions.
Given a = 5, b = 1, x = 10, and y = 5, create a program that outputs the result of the formula f = (a – b)(x – y) using a single printf() function.
2.Create a program that uses the preceding formula and displays the result, but this time, prompt the user for the values a, b, x, and y. Use appropriate variable names and naming conventions.
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.