namespace AG15001Formativa1Ej3
public const double CONVERSION_BYTE_IMPRESO = 0.9765625;
public static void Main(string[] args)
double Gigabyte_Impreso, Gigabytes_PC, Terabytes_PC;
Console.WriteLine("AG15001Formativa1Ej3 - Cálculo de la cantidad de Gigabytes y Terabytes que mostrarán las computadoras");
Console.WriteLine("Autores: AG15001\tMP15035\tOA15003\t\tGT: 07\n");
Gigabyte_Impreso = LeerDouble("Ingrese la capacidad de la memoria: ");
Gigabytes_PC = Gigabyte.Calcular_Gigabytes_PC(CONVERSION_BYTE_IMPRESO, Gigabyte_Impreso);
Terabytes_PC = Terabyte.Calcular_Terabytes_PC(Gigabytes_PC);
Console.WriteLine("\nResultados.");
Console.WriteLine("Los valores que su computadora mostrará serán: \n{0:#####0.00000000} Gigabytes y {1:#####0.00000000} Terabytes.", Gigabytes_PC, Terabytes_PC);
static double LeerDouble(string mensaje)
Console.WriteLine(mensaje);
valor = double.Parse(Console.ReadLine());
public static double Calcular_Gigabytes_PC(double CONVERSION_BYTE_IMPRESO, double Gigabyte_Impreso)
Gigabytes_PC = Gigabyte_Impreso*(Math.Pow(CONVERSION_BYTE_IMPRESO,3));
public static double Calcular_Terabytes_PC (double Gygabytes_PC)
Terabytes_PC = Gygabytes_PC / 1024;