Advertisement
Guest User

bal

a guest
Jul 17th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int a,b,c;
  7. printf("enter the numbers : \n");
  8. scanf("%d %d %d",&a,&b,&c);
  9. if(a==b)
  10. { if (b==c)
  11. printf("all the numbers are same");
  12. else printf("there is redundency");
  13.  
  14. }
  15. else if(a!=b)
  16. {
  17. if(a==c)
  18. printf("there is redundency");
  19. else if(b==c)
  20. printf("there is redundency");
  21. else if(a>b)
  22. {
  23. if (a>c)
  24. printf("the largest number is %d\n",a);
  25. else if(c>b)
  26. printf("the largest number is %d\n",c);
  27. }
  28. else if (b>a)
  29. {
  30. if (b>c)
  31. printf("the largest number is %d\n",b);
  32. else if (c>b)
  33. printf("the largest number is %d\n",c);
  34. }
  35. }
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement