Generation

generate functionFri, 19 May 2023

Escribir un programa que calcule el producto de la matriz A por el vector v. "a"=8 "b"=7 "c"=5 Donde la matriz A es: 3a 3 3c 4b 9 8a 7 5c 2c y el vector v es: 8c 1 4b Luego escribir una función para: 1) Si "a" toma valores de 0 a 5, hallar el menor elemento del vector resultante 2) Si "a" toma valores de 6 a 9, hallar el mayor elemento del vector resultante. Mostrar el resultado por pantalla del producto y del menor o mayor valor.

// function that: Escribir un programa que calcule el producto de la matriz A por el vector v. "a"=8 "b"=7 "c"=5 // Where the matrix A is: // 3a 3 3c // 4b 9 8a // 7 5c 2c // and the vector v is: // 8c // 1 // 4b // Then write a function for: // 1) If "a" takes values from 0 to 5, find the smallest element of the resulting vector // 2) If "a" takes values from 6 to 9, find the largest element of the resulting vector. Show the result of the product and the smaller or larger value. #include <iostream> #include <conio.h> using namespace std; void my_function(int a, int b, int c) { int A[3][3] = {{3 * a, 3, 3 * c}, {4 * b, 9, 8 * a}, {7, 5 * c

Questions about programming?Chat with your personal AI assistant