C: One rep max calculator.

//  Based on user input, calculate and output a scale of 50%-90% of 1RM
#include <stdio.h>
int main(int argc, int argv[])
{
    double onerm = 0; // stores user input for one rep max
    
    printf("Enter your one rep max: \n");
    scanf("%lf", &onerm);
    
    for (int i=5; i <= 9; ++i) // Loop from 50% to 90% of one rep max
        printf("%.2f%% = %.2f lbs\n", i*0.1*100, i*0.1*onerm);

    return 0; 

}


 

Popular posts from this blog

C programming and relevancy

Shakespeare AI: My lady is more beauteous than a rose.

C: Temperature Conversion With Main Repeat