Documentos de Académico
Documentos de Profesional
Documentos de Cultura
PRESENTADO POR:
PRESENTADO A:
GRUPO No 52
INTRODUCCIÓN A LA PROGRAMACIÓN
ABRIL 2017
OBJETIVOS
OBJETIVO GENERAL
OBJETIVOS ESPECIFICOS
namespace Grupo_52_Fase_3
{
class Program
{
static void Main(string[] args)
{
//Declaración variables para los cuatro atletas
double tiempoatleta1, tiempoatleta1V2, tiempoatleta1V3;
double promediototal, promediototal1, promediototal2, promediototal3,
promediototal4;
double promediov1, promediov2, promediov3;
double tiempoatleta2, tiempoatleta2V2,
tiempoatleta2V3,tiempototalempleado;
double tiempoatleta3, tiempoatleta3V2, tiempoatleta3V3;
double tiempoatleta4, tiempoatleta4V2, tiempoatleta4V3;
string dato= "";
double[,] tabla = new double[4, 5];
else
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("*************************************************");
//Ejecución de los tiempos de la segunda vuelta
Console.WriteLine("*************************************************");
//Confirmación de la vuelta de cada atleta
Console.WriteLine("*************************************************");
//Generación del promedio de vuelta y ganador de la vuelta.
else
Console.WriteLine("*************************************************");
Console.WriteLine("*************************************************");
//Confirmación tiempos vueltas atletas
else
Console.WriteLine("*************************************************");
promediototal=((tiempoatleta1+tiempoatleta1V2+tiempoatleta1V3+tiempoatleta2+tiempoat
leta2V2+tiempoatleta2V3+tiempoatleta3+tiempoatleta3V2+tiempoatleta3V3)/9);
promediototal1=((tiempoatleta1+tiempoatleta1V2+tiempoatleta1V3)/3);
promediototal2=((tiempoatleta2+tiempoatleta2V2+tiempoatleta2V3)/3);
promediototal3=((tiempoatleta3+tiempoatleta3V2+tiempoatleta3V3)/3);
promediototal4=((tiempoatleta4+tiempoatleta4V2+tiempoatleta4V3)/3);
Console.WriteLine();
Console.WriteLine();
else
Console.ReadKey(); } } }
CODIGO DE SOLUCIÓN PROPUESTO POR ANDRÉS RODRGIGUEZ
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AtletismoAndres
{
class Program
{
static void Main(string[] args)
{
ConsoleKeyInfo opcion;
Double at1 = 0;
Double at2 = 0;
Double at3 = 0;
Double at21 = 0;
Double at22 = 0;
Double at23 = 0;
Double at31 = 0;
Double at32 = 0;
Double at33 = 0;
Double prom1 = 0;
Double prom2 = 0;
Double prom3 = 0;
do
{
Console.Clear();
Console.Write("1.) Ingresar Tiempos." + "\n" + "2.) Consultar
Tiempos." + "\n" + "3.) Promedio por Atleta." + "\n" + "4.) Ganador competencia" +
"\n" + "Esc.) Salir");
Console.WriteLine("\n" + "\n" + "Seleccione Opción" + "\n");
opcion = Console.ReadKey(true);
switch (opcion.Key)
{
Console.Clear();
Console.WriteLine("Ingrese los tiempos del 1 atleta en
segundos");
Console.WriteLine("Tiempo 1:");
at1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Tiempo 2:");
at2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Tiempo 3:");
at3 = Convert.ToDouble(Console.ReadLine());
Console.Clear();
Console.WriteLine("Ingrese los tiempos del 2 atleta en
segundos");
Console.WriteLine("Tiempo 1:");
at21 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Tiempo 2:");
at22 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Tiempo 3:");
at23 = Convert.ToDouble(Console.ReadLine());
Console.Clear();
Console.WriteLine("Ingrese los tiempos del 3 atleta en
segundos");
Console.WriteLine("Tiempo 1:");
at31 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Tiempo 2:");
at32 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Tiempo 3:");
at33 = Convert.ToDouble(Console.ReadLine());
break;
Console.WriteLine("********************************************");
Console.WriteLine("El atleta 1 tiene promedio de: " +
prom1);
Console.WriteLine("\n" +
"********************************************");
Console.WriteLine("El atleta 2 tiene promedio de: " +
prom2);
Console.WriteLine("\n" +
"********************************************");
Console.WriteLine("El atleta 3 tiene promedio de: " +
prom3);
Console.WriteLine("\n" +
"********************************************");
Console.WriteLine("\n" + "Presione cualquier tecla para
volver");
Console.ReadLine();
break;
//Ganador de la competencia
case ConsoleKey.D4:
Console.Clear();
prom1 = at1 + at2 + at3;
prom1 = prom1 / 3;
prom2 = at21 + at22 + at23;
prom2 = prom2 / 3;
prom3 = at31 + at32 + at33;
prom3 = prom3 / 3;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Grupo_52_Fase_3_JM
{
class Program
{
static void Main(string[ ] args)
{
//Arreglo para informacion de 4 participantes en 3 carreras.
float[,] A = new float[4, 3];
//Declaracion de variables para guardar tiempos.
//Asignacion de un tiempo a la variable tGanador para realizar
comparaciones.
float tiempo, promTiempo, acumTiempo, ganador = 0, tGanador = 1000000;
int x, y;
//Ciclo para capturar los tiempos de los participantes en las diferentes
carreras
for (x = 0; x < 4; x++)
{
for (y = 0; y < 3; y++)
{
Console.Write("Ingrese tiempo de la carrera " + (y + 1) + " del atleta " +
(x + 1) + " : ");
tiempo = float.Parse(Console.ReadLine());
A[x, y] = tiempo;
}
}
x = 0;
//Ciclo que calcula el promedio de tiempo por jugador y el ganador.
while (x < 4)
{
acumTiempo = 0;
for (y = 0; y < 3; y++)
acumTiempo = acumTiempo + A[x, y];
promTiempo = acumTiempo / 3;
}
}
SOLUCIÓN PROPUESTA POR ANA LEGUIZAMON
Module Module1
Dim atl1com1, atl2com1, atl3com1, atl4com1, atl1com2, atl2com2, atl3com2, atl4com2,
atl1com3, atl2com3, atl3com3, atl4com3, resatl1, resatl2, resatl3, resatl4, atlMa As Integer
Sub Main()
Console.WriteLine("INGRESAR TIEMPO EN SEGUNDOS Y PRESIONAR ENTER"
& vbCrLf & vbCrLf)
Console.WriteLine("COMPETENCIA DE ATLETAS" & vbCrLf & vbCrLf)
Console.WriteLine("COMPETENCIA NUMERO UNO")
Console.WriteLine("INGRESE TIEMPO ATLETA NUMERO UNO")
atl1com1 = Console.ReadLine()
Console.WriteLine("INGRESE TIEMPO ATLETA NUMERO DOS")
atl2com1 = Console.ReadLine()
Console.WriteLine("INGRESE TIEMPO ATLETA NUMERO TRES")
atl3com1 = Console.ReadLine()
Console.WriteLine("INGRESE TIEMPO ATLETA NUMERO CUATRO")
atl4com1 = Console.ReadLine()
If resatl1 < resatl2 And resatl1 < resatl3 And resatl1 < resatl4 Then
atlMa = "1"
End If
If resatl2 < resatl1 And resatl2 < resatl3 And resatl2 < resatl4 Then
atlMa = "2"
End If
If resatl3 < resatl1 And resatl3 < resatl2 And resatl3 < resatl4 Then
atlMa = "3"
End If
If resatl4 < resatl1 And resatl4 < resatl2 And resatl4 < resatl3 Then
atlMa = "4"
End If
MsgBox("RESULTADOS" & vbCrLf & "ATLETA 1: " & resatl1 & vbCrLf &
"ATLETA 2: " & resatl2 & vbCrLf & "ATLETA 3: " & resatl3 & vbCrLf & "ATLETA 4: "
& resatl4 & vbCrLf & vbCrLf & "EL GANADOR ES EL ATLETA NUMERO: " & atlMa
& vbCrLf & "CON EL MENOR TIEMPO")
End Sub
End Module
TABLA DE AUTOEVALUACIÓN
TABLA DE AUTOEVALUACION
Desarrollo
los
Reviso los Desarrollo el punto:
ejemplos Ingreso a Interactuo
Nombre del contenidos
de los tiempo al con los
Estudiante de la
contenidos foro compañeros
Unidad 3
de la 1 2 3
unidad 3
Carlos David
X X X X X X X
Barbosa
Carlos Hernan
NO PRESENTÓ ACTIVIDAD
Acuna
Juan Fernando
X X X X X X X
Martinez
Andres Fernando
X X X X X X X
Rodriguez
Ana Milena
X X X X X X X
Leguizamon
CONCLUSIONES