1. El primero...... con la primera funcion no reciben ni retornan<br />#include<iostream.h>void mayor(){ int num1, num2; cout << quot;
NUMERO 1: quot;
; cin >> num1; cout << quot;
NUMERO 2: quot;
; cin >> num2; if (num1>num2) { cout<<endl<<quot;
EL NUMERO MAYOR ES: quot;
<<num1<<endl; cout<<quot;
EL NUMERO MENOR ES: quot;
<<num2; } else { cout<<endl<<quot;
EL NUMERO MAYOR ES: quot;
<<num2<<endl; cout<<quot;
EL NUMERO MENOR ES: quot;
<<num1; }}int main(){ mayor();} <br />Segundo programa con la funcion reciben y no retornan.....<br />#include<iostream.h>void mayor(int num1, int num2){ if (num1>num2) { cout<<endl<<quot;
EL NUMERO MAYOR ES: quot;
<<num1<<endl; cout<<quot;
EL NUMERO MENOR ES: quot;
<<num2; } else { cout<<endl<<quot;
EL NUMERO MAYOR ES: quot;
<<num2<<endl; cout<<quot;
EL NUMERO MENOR ES: quot;
<<num1; }}int main(){ int num1, num2; cout << quot;
NUMERO 1: quot;
; cin >> num1; cout << quot;
NUMERO 2: quot;
; cin >> num2; mayor(num1, num2);}<br />El tercero retornan y no reciben......<br />#include<iostream.h>int mayor(){ int num1, num2,r; cout << quot;
Numero 1: quot;
; cin >> num1; cout << quot;
Numero 2: quot;
; cin >> num2; if (num1>num2) { r=num1; } else { r=num2; } return r;}int main(){ int r; r=mayor(); cout<<endl<<quot;
EL NUMERO MAYOR ES: quot;
<<r;}<br />La cuarta forma que retorna y recibe.....<br />#include<iostream.h>int mayor(int num1, int num2){ int r; if (num1>num2) { r=num1; } else { r=num2; } return r;}int menor(int num1, int num2){ int m; if (num1<num2) { m=num1; } else { m=num2; } return m;}int main(){ int num1, num2, r,m; cout << quot;
NUMERO 1: quot;
; cin >> num1; cout << quot;
NUMERO 2: quot;
; cin >> num2; r = mayor(num1, num2); m=menor(num1,num2); cout <<endl<< quot;
EL NUMERO MAYOR ES: quot;
<< r<<endl; cout << quot;
EL NUMERO MENOR ES: quot;
<< m;}<br />