该程序是如何实现循环的
#include<stdio.h>#define SEC 60
int main(void)
{
int sec,min,left;
printf("Convert seconds to minute an seconds!\n");
printf("Enter the number of seconds(<=0 to quit);\n");
scanf("%d",&sec);
while(sec>0)
{
min=sec/SEC;
left=sec%SEC;
printf("%d seconds is %d minutes, %d seconds.\n",sec,min,left);
scanf("%d",&sec);
}
printf("Done!\n");
return 0;
}
求大神解释啊!主要就是不明白下面这里是如何实现的
printf("Enter the number of seconds(<=0 to quit);\n");
scanf("%d",&sec);
谢谢了