fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int y=1, i=0, x=0;
  5. scanf("%d",&x);
  6. while (i<x/2)
  7. {
  8. i++;
  9. y+=i;
  10. }
  11. printf("DC +%d, %d uses/day\n", (x), y);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 2296KB
stdin
54
stdout
DC +54, 379 uses/day