May code na po ako pero kulang tlga. d kasi nag rerepeat yung "Enter Number" pra mag accept ng INT.
ito po code ko
ito po code ko
Java:
import java.util.Scanner;
class Main{
public static void main(String[] args)
{
Scanner sc= new Scanner(System.in);
int[][] array = new int[10][2];
for (int i=0; i<10; i++)
{
for (int j=0; j<2; j++)
{
int num = sc.nextInt();
array[I][j] = num;
}
}
for (int i=0; i<10; i++)
{
if(i == 5)
{
System.out.println();
}
for (int j=0; j<2; j++)
{
System.out.print(array[I][j] + "\t");
}
System.out.println();
}
}
}
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
Last edited: