0% found this document useful (0 votes)
43 views2 pages

Class Static Int New Int Static Int Int: Program

This document contains code for a program that allows a user to select different options for analyzing an array of integers. The options include entering data into the array, finding the maximum value, finding the minimum value, and calculating the average. The code defines methods for displaying a menu, entering data into the array, finding the maximum value, and finding the minimum value.

Uploaded by

Melissa Sue
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views2 pages

Class Static Int New Int Static Int Int: Program

This document contains code for a program that allows a user to select different options for analyzing an array of integers. The options include entering data into the array, finding the maximum value, finding the minimum value, and calculating the average. The code defines methods for displaying a menu, entering data into the array, finding the maximum value, and finding the minimum value.

Uploaded by

Melissa Sue
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

class Program

{
static int[] A = new int[n];
static int menu()
{
int opcion, A;
System.Console.WriteLine("\tArreglos
multidireccionales \n\n");
System.Console.WriteLine(" 1 ==> Ingreso de
tensiones ");
System.Console.WriteLine(" 2 ==> mayor ");
System.Console.WriteLine(" 3 ==> menor ");
System.Console.WriteLine(" 6 ==> promedio ");
System.Console.WriteLine(" 0 ==> salir ");
System.Console.Write(" \n\n que opcion vas a elegir
");
opcion = int.Parse(System.Console.ReadLine());
return opcion;
}
static void ingreso()
{
int dato;
for (int i = 0; i < n; i++)
{
System.Console.Write("\t ingrese dato ");
dato = int.Parse(System.Console.ReadLine());
A[i] = dato;
System.Console.WriteLine("\t se ingreso dato en
celda posicion " + i);
}
System.Console.WriteLine("termine de ingresar
datos");

}
static void mayor()
{
int mayor;
mayor = A[0];
for (int i = 0; i < n; i++)

{
if (A[i] > mayor)
mayor = A[i];
}
Console.WriteLine("el número máximo es: " + mayor);
Console.ReadLine();
}
static void menor()
{

You might also like