Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void dobra (float *x);
- void fim (void);
- int main(){
- float a;
- printf("Entre com o numero a ser dobrado: ");
- scanf("%f", &a);
- dobra(&a);
- printf("\nValor dobrado: %.2f", a);
- fim ();
- return 0;
- }
- void dobra (float *x)
- {
- *x*=2;
- }
- void fim(void)
- {
- printf("\n\n\n");
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement