Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include <string>
- #include <random>
- #include <vector>
- #include <fstream>
- using namespace std;
- int max(int a, int b, int c) {
- if (a > b && a > c) return a;
- if (b > a&& b > c)return b;
- else return c;
- }
- int max(vector<double> numbers)
- {
- double a = numbers[0];
- for (int i = 1; i < numbers.size(); i++)
- {
- if (a < numbers[i])
- a = numbers[i];
- }
- return a;
- }
- int main()
- {
- int a, b, c;
- cin >> a >> b >> c;
- cout << min(a, b, c) << endl;
- ifstream file("info.txt");
- vector <double>nums;
- double number = 0;
- while (file >> number);
- {
- nums.push_back(number);
- }
- cout << max(nums);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement