#include <iostream> #include <iomanip> using namespace std; // your code here: declare and define printValue(int) void printValue(int val) { cout << "Value=" << val; } void printValue(float val) { cout <<"Value=" << val; } // your code here: declare and define printValue(float) int main() { float val; cin >> val; if (val == (int)val) { printValue((int)val); // int version } else { printValue(val); // float version } return 0; }
Test Cases
Test Results
Input
42
Expected Output
Value=42