+ 1
Print number m to n which is divisible by 5
do in for loop
3 Answers
+ 10
This's the C++ Version
int m,n;
cin >> m;
cin >> n;
for(int i = m;i<n;i++){
if(i%5 == 0){'Print '+ i 'is divisible by 5' };
}
// Javascript Version
var start = prompt('Start Number');
var end = prompt('End Number');
for(i = start; i < end; i++){
document.write(i + 'is divisible by 5')
};
+ 8
public static void main (int m,int n)
{for(int x=m;x<=n;x++)
{if (x%5==0)
System.out.println(x);
}
}
0
input_m
input_n
for(I=0;I<n;i++)
if(i%5==0):
print('i')