Upload
alexa-alexuu
View
221
Download
0
Embed Size (px)
Citation preview
7/25/2019 Matrice Java
1/3
PROIECT
DUMITRICA ANDRA CRISTINA
FAIMA
GRUPA 1513
7/25/2019 Matrice Java
2/3
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Andra
{
public static void main !tring# args$ thro%s java.lang.&'ception
{
int## arr ( { {)+,-)+
{-+012,
{,,3+21--1
{3+0)2)1);
int n(2;
forint j ( 4; j 5 n ; j66$
{
ifj78(4$
{
for int i ( 4; i 5 n 3 +; i66$
{
int inde' ( i;
for int 9 ( i 6 +; 9 5 n; 966$
if arr9#j# : arrinde'#j#$
inde' ( 9;
int smallerNumber ( arrinde'#j#;
arrinde'#j# ( arri#j#;
arri#j# ( smallerNumber;
else
7/25/2019 Matrice Java
3/3
{
for int 9 ( +; 9 5 n; 966$
{
int initial ( arr9#j#;
int i ( 93+;
%hile i : 3+$ arr i#j# : initial $ $ {
arr i6+#j# ( arr i#j#;
i33;
arri6+#j# ( initial;
forint '(4; '5n; '66$
{
forint y(4; y5n;y66$
!ystem.out.printarr'#y#6" "$;
!ystem.out.print"