//Hydroelectric Dam Helper
#include <stdio.h>
#define GRAV 9.80
#define EFINC 0.9
#define EFINC2 90
int main()
{
//Defines all the variables to be used
double height, work, mass;
printf("Height of dam (in meters):");
scanf("%lf", &height);
printf("Flow of water (in thousand cubic meters per second):");
scanf("%lf", &mass);
work = (mass * GRAV * height * EFINC);
printf("The dam would produce %f megawatts at %d%% efficency", &work, EFINC2);
return 0;
}
The values set correctly, I tested it by having it print height and mass but work never receives a value, and EFINC2 prints out a ridiculous number that I'm not really sure about