31 lines
978 B
C++
31 lines
978 B
C++
|
#include <iostream>
|
||
|
|
||
|
#include "max.hh"
|
||
|
#include "min.hh"
|
||
|
|
||
|
#define LIST_SIZE 5
|
||
|
int main() {
|
||
|
double dbl_a = 2.31233;
|
||
|
double dbl_b = 91.3239;
|
||
|
|
||
|
int list[ LIST_SIZE ] = { 0, 2 ,4 , 6, -9 };
|
||
|
|
||
|
|
||
|
std::cout << "Doubles" << std::endl;
|
||
|
std::cout << "max(" << dbl_a << ", " << dbl_b << ") = " << mylib::max(dbl_a, dbl_b ) << std::endl;
|
||
|
std::cout << "min(" << dbl_a << ", " << dbl_b << ") = " << mylib::min(dbl_a, dbl_b ) << std::endl;
|
||
|
std::cout << std::endl;
|
||
|
/*
|
||
|
std::cout << "Int & Doubles" << std::endl;
|
||
|
std::cout << "max(" << list[4] << ", " << dbl_b << ") = " << mylib::max(list[4], dbl_b ) << std::endl;
|
||
|
std::cout << "min(" << list[4] << ", " << dbl_b << ") = " << mylib::min(list[4], dbl_b ) << std::endl;
|
||
|
std::cout << std::endl;
|
||
|
*/
|
||
|
|
||
|
std::cout << "List" << std::endl;
|
||
|
//std::cout << "max( list, " << LIST_SIZE << ") = " << mylib::max ) << std::endl;
|
||
|
//std::cout << "min( list, " << dbl_a << ", " << dbl_b << ") = " << mylib::max(dbl_a, dbl_b ) << std::endl;
|
||
|
|
||
|
return 0;
|
||
|
}
|