fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. double total = 30000;
  6. double current = 10;
  7. int n = 0;
  8.  
  9. while(current < total)
  10. {
  11. current = current * 1.32;
  12. n+=2;
  13. }
  14. printf("%f final, %d", current, n);
  15. }
  16.  
Runtime error #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
31379.354459 final, 58