2.4

#include<stdio.h>

int main(void)

{

         int i, m,n;

         double y;

 

         printf("Enter m:");

         scanf("%d",&m);

         printf("Enter n:");

         scanf("%d",&n);

 

         for(i=m;i<=n;i++){

                   y=i*i+1/i;

                   printf("%lf",y);

         }

         return 0;

}

posted @ 2013-10-19 20:39  zhaoyang16  阅读(133)  评论(0编辑  收藏  举报