6.7

来源:互联网 发布:hp m1136驱动下载 mac 编辑:程序博客网 时间:2024/06/03 18:49
#include <stdio.h>#include <math.h>int main(){    int n;    float x,m;    printf("input x:");    scanf("%f",&x);    x+=1;    for(n=1;;n++)    {        m=pow(x,n);printf("%d %f\n",n,m);        if(m>=2)            break;    }n++;printf("%d",n);    return 0;}

这里写图片描述
1.理解函数的应用
2.理解函数满足的条件,跳出函数