Generation

generate functionFri, 14 Apr 2023

Escribir un programa que permita ingresar numeros por pantalla y calcule el mayor, el menor, la media aritmetica y la media geometrica de esos numeros y los muestre por pantalla

#include <iostream> #include <cmath> void main() { int x, y, z; cout << "Ingrese un numero entero" << endl; cin >> x; y = x; z = x; for (int i = 0; i < 8; i++) { cout << "Ingrese otro numero entero" << endl; cin >> x; if (x > y) { y = x; } if (x < z) { z = x; } } cout << "El valor maximo es: " << y << endl; cout << "El valor minimo es: " << z << endl; system("pause"); }

Want to kickstart your project?Use the new AI Studio to create your code