Computer Science, asked by jagadeeshmahima25, 11 months ago

wap to enter any 50 numbers and check whether they are divisible by 5 or not ​

Attachments:

Answers

Answered by sahasuparno
2

class program{

public static void main(){

Scanner sc=new Scanner(System.in);

System.out.println("Enter 50 numbers ");

for(int i=0;i<=50;i++){

int a =sc.nextInt();

}

int s=0;

if(a%5==0){

if(a%10==5){

System.out.println("the numbers ending with 5 are:"+a);

}

if(a%10==0){

s+=1;

}

System.out.println(s+"digits end with 0");

}

}

}

Similar questions