Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- void main()
- {
- int y = 0;
- int x = 0;
- std::cout << "Enter first digit: ";
- std::cin >> x;
- std::cout << "Enter second digit: ";
- std::cin >> y;
- if (x > y)
- {
- std::cout << "The larger digit is: " << x << std::endl;
- }
- else if (y > x)
- {
- std::cout << "The larger digit is: " << y << std::endl;
- }
- else
- {
- std::cout << "The digits are the same!";
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment