The formula simply isn't executing. I tried using printf
to debug and it printed out 0 for i
at the end of the code
#include <stdio.h>
int main()
{
int i, base, height;
printf("Lumber Cross-Sectional Moment of Section\n");
printf("Size Area Inertia Modulus\n");
for (i = 0; i > 35; i++)
{
if (i == 6 || i == 12 || i == 18|| i == 24 || i == 30)
{
base = base * 2;
height = 2;
}
if (i != 6 || i != 12 || i != 18 || i != 24 || i != 30)
{
height = height * 2;
}
printf("%d x %d %d %d %d \n", base, height, base * height, base * 2 + height);
}//for
return (0);
}//main