break的问题
#include "stdafx.h"#include<stdio.h>
int main(void)
{
float length, width, c;
printf("Enter the length of the rectangle: \n");
while(scanf("%f",&length) )
{
printf("Length = %0.2f:\n", length);
printf("Enter its width: \n");
if(scanf("%f", &width) != 1)
break;
printf("width = %0.2f:\n", width);
c = length * width;
printf("Enter the length of 1 the rectangle:\n" );
}
printf("Done.\n");
getchar();
return 0;
}
为什么不会终止程序