Advertisement
Dido09

Compare 3 numbers - C

Mar 14th, 2022
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int num1, num2, num3;
  7.  
  8. printf("Enter three numbers to compare: ");
  9. scanf("%d %d %d", &num1, &num2, &num3);
  10.  
  11. if ((num1 == num2) && (num1 == num3))
  12. printf("Yes!");
  13. else
  14. printf("No!");
  15.  
  16.  
  17.  
  18. return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement