7.10 break.c 程序

7.10 break.c 程序

#include <stdio.h>
int main(void)
{
    float length, width;
    printf("Enter the length of the rectangle:
");
    while (scanf("%f", &length) == 1)
    {
        printf("Length = %0.2f:
", length);
        printf("Enter its 
");
        if (scanf("%f", &width) != 1)
            break;
        printf("Width = %0.2f:
", width);
        printf("Area = %0.2f:
", length * width);
        printf("Enter the length of the rectangle:
");
    }
    printf("Done.
");
    return 0;
}

原文地址:https://www.cnblogs.com/EisNULL/p/10702780.html