Advertisement
bogolyubskiyalexey

Untitled

Sep 30th, 2020
610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. int main() {
  2.     int inputType;
  3.     cin >> inputType;
  4.  
  5.     if (inputType == 0) {
  6.         float items[2];
  7.         cin >> items[0] >> items[1];
  8.         cout << mySolution(items) << endl;
  9.     } else if (inputType == 1) {
  10.         double items[2];
  11.         cin >> items[0] >> items[1];
  12.         cout << mySolution(items) << endl;
  13.     } else if (inputType == 2) {
  14.         vector<float> items(2);
  15.         cin >> items[0] >> items[1];
  16.         cout << mySolution(items) << endl;
  17.     } else if (inputType == 3) {
  18.         vector<double> items(2);
  19.         cin >> items[0] >> items[1];
  20.         cout << mySolution(items) << endl;
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement