MATRICES
#include <iostream>
#include <math.h>
using namespace std;
int Multiplicacion();
int SegundoGrad();
int Formula();
int A[5][5];
int B[5][5];
int C[5][5];
int R[5][5];
int menu, i, j, n, m, k, Vo;
double w, t;
int main(){
cout<<"********** Menu ********** \n";
cout<<"1. Multiplicacion de matrices \n";
cout<<"2. Segundo Grado \n";
cout<<"3. Formula \n";
cout<<"Elije una opcion: "; cin>>menu;
cout<<endl;
switch(menu){
case 1:
Multiplicacion();
break;
case 2:
SegundoGrad();
break;
case 3:
Formula();
break;
default:
cout<<"Esa opcion no es Valida \n";
cout<<"AlgoritmoDJ";
}
return 0;
} //Fin del Programa
//Zona de Funciones
/* Caso 1 */
int Multiplicacion(){
cin>>m; cin>>n;
for(i = 1; i <=n; i++){
for(j = 1; j <= m; j++){
C[i][j] = C[i][j] * (A[i][j] * B[i][j]);
cout<<C[i][j];
}
}
}
/* Caso 2 */
int SegundoGrad(){
cin>>m; cin>>n;
for(i = 1; i <=n; i++){
for(j = 1; j <= m; j++){
(B[i][j]) = (A[i][j])* pow(A[i][j], 2) * 10 + (C[i][j]);
cout<<(B[i][j])<<endl;
}
}
}
/* Caso 3 */
int Formula(){
Vo = 100; i = 1; j = 1;
for(w = 5; w <= 15; w = w + 0.25){
for(t = 0.1; t <= 2; t = t + 0.1){
R[i][j] = Vo * cos(w * t);
cout<<"R[ "<<i<<" ][ "<<j<<" ] = ";cout<<R[i][j];
cout<<endl;
i++; j++;
}
}
}