Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void dobra (float *x);
  5. void fim (void);
  6.  
  7. int main(){
  8.     float a;
  9.  
  10.     printf("Entre com o numero a ser dobrado: ");
  11.     scanf("%f", &a);
  12.     dobra(&a);
  13.     printf("\nValor dobrado: %.2f", a);
  14.    
  15.     fim ();
  16.    
  17.  
  18.     return 0;
  19. }
  20. void dobra (float *x)
  21. {
  22.     *x*=2;
  23. }
  24. void fim(void)
  25. {
  26.       printf("\n\n\n");
  27.       system("pause");
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement