Schknheit

Untitled

Feb 27th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.    
  5.     float num, chute, ma1, mh1, ma2, mh2;
  6.     chute = 1;
  7.     printf("Entre com numero inteiro positivo\n");
  8.     scanf("%f",&num);
  9.     ma1 = (chute + num)/2;
  10.     mh1 = (chute * num)/ma1;
  11.     ma2 = (ma1 + mh1)/2;
  12.     mh2 = (ma1 * mh1)/ma2;
  13.     printf("%f", mh2);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment