nikolas_serafini

Lista 3 - Exercício 60

Jun 16th, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4. int main()
  5. {
  6.     float ze = 1.1, chico = 1.5;
  7.     int years = 0;
  8.  
  9.     while(ze < chico)
  10.     {
  11.         ze = ze + 0.03;
  12.         chico = chico + 0.02;
  13.         years++;
  14.     }
  15.     printf("%d anos!\n",years);
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment