-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProg_107_Atleta
More file actions
56 lines (48 loc) · 2.32 KB
/
Copy pathProg_107_Atleta
File metadata and controls
56 lines (48 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import java.util.Scanner;
public class Prog_107_Atleta {
public static void main(String [] args) {
System.out.println("**************************************************");
System.out.println("**************************************************");
System.out.println("** **");
System.out.println("** Universidad Autónoma de Tamaulipas **");
System.out.println("** Facultad de Ingeniería **");
System.out.println("** ~Arturo Narro Siller~ **");
System.out.println("** Ingeniería en Sistemas Computacionales **");
System.out.println("** 1er. Grado, Grupo H **");
System.out.println("** Fundamentos de Programación **");
System.out.println("** **");
System.out.println("** Prog_107_Atleta **");
System.out.println("** **");
System.out.println("** Desarrollado por: **");
System.out.println("** Ramírez Del Ángel Luis Felipe **");
System.out.println("** **");
System.out.println("** 22/10/2020 **");
System.out.println("**************************************************");
System.out.println("**************************************************");
Scanner scanner = new Scanner(System.in);
int Suma = 0, Tiempo = 0;
boolean Apto = true;
double Prom = 0.0;
for(int i = 1; i <= 10; i = i + 1)
{
System.out.println("Escriba el Tiempo del Día " + i + "En Minutos:");
Tiempo = scanner.nextInt();
if(Tiempo > 16)
{
Apto = false;
}
Suma = Suma + Tiempo;
}
Prom = Suma / 10;
if( Apto == false || Prom > 15)
{
System.out.println("Usted No es Apto.");
System.out.println("Promedio: " + Prom);
}
else
{
System.out.println("Usted es Apto.");
System.out.println("Promedio: " + Prom);
}
}
}