Object-Oriented Programming in C++

Code display of PL2/max1.cpp

// PL1/max1.cpp
// clumsy definition of a max function
// Niels Walet, last updated 04/12/2019
#include<iostream>
double max_double(double double1, double double2)
{
  if(double1>double2) return double1; else return double2;
}
int max_int(int int1, int int2)
{
  if(int1>int2) return int1; else return int2;
}
int main()
{
  int integer1{1};
  int integer2{2};
  double real1{4.};
  double real2{3.};
  std::cout<<max_int(integer1,integer2)<<std::endl
	   <<max_double(real1,real2)<<std::endl;
  return 0;
}

Download here; To copy and paste: double click inside code, then copy.