To input three integers a, b, and c, and determine which number is the biggest


SUBMITTED BY: Guest

DATE: Oct. 12, 2013, 1:47 a.m.

FORMAT: C++

SIZE: 639 Bytes

HITS: 1291

  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a;
  5. int b;
  6. int c;
  7. printf("\n Please enter three integers : ");
  8. scanf_s("%d %d %d", &a, &b, &c);
  9. if (a > b)
  10. {
  11. if (a > c)
  12. {
  13. printf("\n %d is the biggest.", a);
  14. }
  15. else
  16. {
  17. printf("\n %d is the biggest.", c);
  18. }
  19. }
  20. else
  21. {
  22. if (b > c)
  23. {
  24. printf("\n %d is the biggest.", b);
  25. }
  26. else
  27. {
  28. printf("\n %d is the biggest.", c);
  29. }
  30. }
  31. getchar();
  32. getchar();
  33. return 0;
  34. }

comments powered by Disqus