习题二 4

#include<stdio.h>
int main(void)
{
    int m,n;
    double i,y;
    y=1;
    printf("输入m,n的值:");
    scanf("%d%d",&m,&n);
    for(i=m;i<=n;i++){
        y=y+(i*i+1/i);
    }
    printf("y=%Lf",y);
    return 0;
}

posted @ 2013-10-21 00:16  傻子疯子捏子  阅读(118)  评论(0编辑  收藏  举报