#include <iostream>
usingnamespace std;
int main()
{
float a;
float x;
// Now you fill in here how to create a variable named "b"
cout << "Enter a: \n";
cin >> a;
cout << "Enter x: \n";
cin >> x;
// Now youfill in here how to get the value for "b"
cout << "(a + x) /b = " << (a+x)/b;
// Now you fix that so it does the right calculation
}
#include <stdio.h>
int main()
{
float a = 0, b = 0, x = 0, y = 0;
printf("Enter a: ");
scanf("%f", &a);
printf("Enter b: ");
scanf("%f", &b);
/*
* TO DO
* calculate the value for y
*/
printf("(%f + %f) / %f = %f", a, x, b, y);
return 0;
}
y is a*x+b, the variable holding the output. MikeyBoy didn't write the line to calculate y he wants you to do it yourself. You know how to assign a variable right? So assign the correct value to y using mathematical operators and the variables a, b and x that's all.