All submissions
#include <iostream>
using namespace std;

// your code here: declare and define setThreshold(int)
void setThreshold(int i) {
    cout << "Threshold set to " << i << "\n";
}
// your code here: declare and define setThreshold(double)
void setThreshold(double d) {
    cout << "Threshold set to " << d << "\n";
}

int main() {
   double val;
   cin >> val;
   if (val == (int)val) {
       setThreshold((int)val); // int version
   } else {
       setThreshold(val);      // double version
   }
   return 0;
}
Loading...

Input

50

Expected Output

Threshold set to 50