import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int array[] = new int[5];
System.out.println("Insert array elements:");
for (int i = 0; i < 5; i++) {
array[i] = input.nextInt();
}
System.out.print ("Inserted array elements:");
for (int i = 0; i < 5; i++) {
System.out.print (" " + array[i]);}
Scanner nput = new Scanner(System.in);
int Narray[] = new int[10];
System.out.println();
System.out.println("Insert array elements:");
for (int k = 0; k < 10; k++) {
Narray[k] = nput.nextInt();
}
System.out.print ("Inserted array elements:");
for (int k = 0; k < 10; k++) {
System.out.print (" " + Narray[k]); }
int x=0;
for (int i=0; i<5; i++) {
if (array[i]<>Narray[k]){
x++}};
if {x=5}{System.out.print("yes");}else{System.out.print("no");}
}
}
class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int array[] = new int[5];
System.out.println("Insert array elements:");
for (int i = 0; i < 5; i++) {
array[i] = input.nextInt();
}
System.out.print ("Inserted array elements:");
for (int i = 0; i < 5; i++) {
System.out.print (" " + array[i]);}
Scanner nput = new Scanner(System.in);
int Narray[] = new int[10];
System.out.println();
System.out.println("Insert array elements:");
for (int k = 0; k < 10; k++) {
Narray[k] = nput.nextInt();
}
System.out.print ("Inserted array elements:");
for (int k = 0; k < 10; k++) {
System.out.print (" " + Narray[k]); }
int x=0;
for (int i=0; i<5; i++) {
if (array[i]<>Narray[k]){
x++}};
if {x=5}{System.out.print("yes");}else{System.out.print("no");}
}
}
Комментариев нет:
Отправить комментарий