Advertisement
AzmayenSabil

Untitled

Oct 15th, 2021
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void findMax(int *a, int *b){
  4.  
  5. if(*a > *b){
  6. printf("%d is greater", *a);
  7. }
  8.  
  9.  
  10. else if(*b > *a){
  11. printf("%d is greater", *b);
  12. }
  13. }
  14.  
  15.  
  16. int main(){
  17.  
  18. int a,b;
  19. scanf("%d %d",&a,&b);
  20.  
  21. int *x, *y;
  22.  
  23. x = &a;
  24. y = &b;
  25.  
  26. findMax(x,y);
  27.  
  28.  
  29. return 0;
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement