Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. int avq(int a, int b, float *result){
  2.  
  3. if(result==0)
  4. {
  5. return 0;
  6. }else
  7. {
  8. result = (a+b)/2;
  9. printf("%f",result);
  10. return 1;
  11.  
  12. }
  13. }
  14.  
  15. int main(){
  16.  
  17. int x=NULL;
  18. int a=10;
  19. int b=8;
  20.  
  21. if (avq(a,b,x)==1){
  22.  
  23. printf("ok");
  24.  
  25. }else{
  26.  
  27. printf("zle");
  28. }
  29.  
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement