#include using std::cout; // program uses cout using std::endl; // program uses endl using std::cin; // program uses endl int min(int, int); int min(int, int, int); int main(){ int a =0; int b =0; int c =0; int n =0; cout<<"Insert how many numbers you want to compare"<>n; if(n == 2){ cout<<"Insert the first number: "; cin>>a; cout<<"\nInsert the second number: "; cin>>b; cout<<"The minimum is: "<>a; cout<<"\nInsert the second number: "; cin>>b; cout<<"\nInsert the third number: "; cin>>c; cout<<"The minimum is: "<y ? y: x); } int min(int x, int y, int z){ int m = (x>y ? y: x); // m = min(x,y) return (z>m ? m:z); }