package задачлевая1;//Базовый уровень
public class Sluch {
public void slu(){
int[] d = new int[14];int k=0;
for(int i =0; i<14; ++i){
d[i]= (int) (Math.random() * 30);
if(d[i]%2 == 0){
k = k + 1;
}
System.out.print(Integer.toString(d[i]) + " ");
System.out.print("\n " + "k = " + Integer.toString(k));
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
package задачлевая1;//Базовый уровень
public class Sluch {
public void slu(){
int[] d = new int[14];int k=0;
for(int i =0; i<14; ++i){
d[i]= (int) (Math.random() * 30);
if(d[i]%2 == 0){
k = k + 1;
}
System.out.print(Integer.toString(d[i]) + " ");
}
System.out.print("\n " + "k = " + Integer.toString(k));
}
}