Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void smallestNumber(int a, int b, int c) {
- int result =
- a < b && a < c ? a :
- b < a && b < c ? b : c;
- cout << result << endl;
- }
- int main() {
- int n1, n2, n3;
- cin >> n1 >> n2 >> n3;
- smallestNumber(n1, n2, n3);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement