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;
}
#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;
}