For loop controlled by double value - C Statement

C examples for Statement:for

Description

For loop controlled by double value

Demo Code

#include <stdio.h>
int main(void)
{
    double debt;/*w w  w  .j  a  v  a  2 s .  c o m*/
    
    for (debt = 80.0; debt < 150.0; debt = debt * 1.1)
        printf("debt: $%.2f.\n", debt);
    return 0;
}

Result


Related Tutorials