fork download
  1. #include<stdio.h>
  2. #include<locale.h>
  3. #define CRESCHICO 0.02
  4. #define CRESCZE 0.03
  5.  
  6. int main()
  7. {
  8. setlocale(LC_ALL,"portuguese");
  9. int contTempo=0;
  10. float h_chico=1.50;
  11. float h_ze=1.10;
  12.  
  13. while(h_chico>=h_ze)
  14. {
  15. h_chico+=CRESCHICO;
  16. h_ze+=CRESCZE;
  17. contTempo+=1;
  18. }
  19.  
  20. printf("%d\n",contTempo);
  21. return 0;
  22. }
Success #stdin #stdout 0s 5432KB
stdin
Standard input is empty
stdout
41