forked from jevalenciap/training
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathluifrangm.java
More file actions
39 lines (29 loc) · 904 Bytes
/
luifrangm.java
File metadata and controls
39 lines (29 loc) · 904 Bytes
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
import java.util.Scanner;
public class MinimumofThree {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Digite la cantidad de trios y los valores de cada uno");
int num = sc.nextInt();
int i,j, menor = 0;
int[][] Vec = new int[num][3];
for(i =0; i< num; i++)
{
for(j=0; j<3; j++)
{
Vec[i][j] = sc.nextInt();
if(j==0)
{
menor = Vec[i][j];
}
if(j>0)
{
if(menor > Vec[i][j])
{
menor = Vec[i][j];
}
}
}
System.out.println(menor);
}
}
}