Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- /**
- - Ler 2 ints e imprimir divisão em float com notação de apontadores
- **/
- float* divisao(int* px,int* py);
- int main()
- {
- int x=0,y=0;
- printf("x= ");
- scanf("%d",&x);
- printf("\ny= ");
- scanf("%d",&y);
- float* pres = NULL;
- pres = divisao(&x,&y);
- printf("%p",pres);
- return 0;
- }
- float* divisao(int* px,int* py){
- float r = (float) *px / *py;
- return &r;
- }
Advertisement
Add Comment
Please, Sign In to add comment