Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- //Se cita edno n, posle toa citame vo narednite n linii trojki od broevi.Za sekoja trojka da se ispecati najgolemiot element.
- int maxi(int x, int y, int z)
- {
- if(x<y)
- {
- x=y;
- }
- if(x<z)
- {
- x=z;
- }
- return x;
- }
- int main()
- {
- int n,i,x,y,z;
- scanf("%d ", &n);
- for(i=0;i<n;i++)
- {
- scanf("%d%d%d", &x, &y, &z);
- printf("%d ", maxi(x,y,z));
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment