Hi, I am currently learning how to program, and have a code below:
int voltage;
printf("Voltage\t\tSoC\tDescription\n");
printf("-------\t\t---\t-----------\n");
for (voltage = voltage_min; voltage <= voltage_max; voltage = voltage + step_size_variable){
printf("%d\t\t%0.3d%%\n", voltage, ((voltage - 3000)/1200)*100);
}
When I run it, the program outputs only 0.00%s, and is not calculating the voltage according to the equation that is inside in the last printf(). Is there any advice to this work...?