Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- //napisati funkciju za izracunavanje hipotenuze trougla ako su date katete a i b
- float hipotenuza (float a, float b){
- return sqrt(pow(a,2)+pow(b,2));}
- int main()
- { float c, a, b;
- printf("unesi stranice a i b\n");
- scanf("%f%f",&a,&b);
- c=hipotenuza(a,b);
- printf("%.2f\n",c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement