fabs(term)>=1e-4
term=sign*1.0/n
sign=-sign
当满足条件时进入循环,进入循环后,当条件不满足时,跳出循环。while语句的一般表达式为:while(表达式){循环体}。
扩展资料
when和while引导的句子可以作过去进行时的时间状语,区别在于:when引导的时间状语从句可以接一段时间或者一个具体的时间点 while引导的时间状语从句只能接一个时间点。如:
通常用在事情同时发生的情况,主句和从句都用过去进行时
Mother was cooking the meal while i was doing my homework.
当妈妈在做饭的时候,我正在做功课。
fabs(term)>=1e-4
term=sign*1.0/n
sign=-sign