fork download
  1. #include<stdio.h>
  2. int main(){
  3. int i=2,s=0,n;
  4. printf("Enter the value of the last series:");
  5. scanf("%d",&n);
  6. again:
  7. i=i+2;
  8. s=s+i;
  9. if(i<=n) goto again;
  10. printf("%d",s);
  11. return 0;
  12. }
Success #stdin #stdout 0s 5316KB
stdin
100
stdout
Enter the value of the last series:2650