摘要:
#include #include main() { int flag,i,n; double item,sum; printf("Enter n:"); scanf("%d",&n); flag=1; sum=0; for(i=1;i<=n;i++){ item=flag*(1.0/(3*i-2)); sum=sum+item; flag=-flag; } printf("sum=%.5f\n",sum); } 阅读全文
摘要:
#includeint main(void){ int x,y; scanf("%d",&x); if(x=1&&x<10){ y=2*x-1; } else{ y=3*x-11; } printf("%d",y); return 0;} 阅读全文