Professional Documents
Culture Documents
a=2
b=3
imprime a y b
imprime a y b
fin
-----------------------------------------------------
imprime x y y
temp=x
x=y
y=temp
imprime x y y
regresa
--------------------------------------------------
#include "apuntador.h"
int main ()
double a,b;
a=2;
b=3;
cout<<"a= "<<a<<endl;
cout<<"b= "<<b<<endl;
funcionIntercambio(a,b);
cout<<"a= "<<a<<endl;
cout<<"b= "<<b<<endl;
return 0;
}
-----------------------------------------------
#include <iostream>
double temp;
cout<<"x = "<<x<<endl;
temp=x;
x = y;
y=temp;
return;
----------------------------------------------------------------
//apuntador
#include <iostream>
double temp;
cout<<"x = "<<*x<<endl;
temp=*x;
*x = *y;
*y=temp;
return;
----------------------------------------------------------------
#include "apuntador.h"
int main ()
double a,b;
a=2;
b=3;
cout<<"a= "<<a<<endl;
cout<<"b= "<<b<<endl;
funcionIntercambio(&a,&b);
cout<<"a= "<<a<<endl;
cout<<"b= "<<b<<endl;
return 0;
----------------------------------------------------------------
inicio
lee matrices A y B
multiplica matrices A y B
imprime AB
fin
inicio
leeArreglo
ordena Arreglo
imprime Arreglo
fin