Write a program (also write its pseudocode and draw its flowchart) to prompt the user to input the variables to solve the following problem:
X2 + X×Y/Z – W*V3
Note 1: You should ask the user to input 5 number to be able to do this calculation.
Note 2: You can use multiplication instead of power if you do not want to use it (as we have not officially covered it).
Here is the solution. Please do upvote thank you.
running code.
#include <stdio.h>
int main()
{
double x, y, z, w, v;
printf("Enter x, y, z, w, v.\n");
scanf("%lf%lf%lf%lf%lf", &x, &y, &z, &w,
&v);
double x2 = x * x;
double v3 = v * v * v;
printf("Answer: %lf\n\n", x2 + x*(y/z) - w*v3);
return 0;
}
Get Answers For Free
Most questions answered within 1 hours.