write a
program
to display the set of even number from
50 to 100 Comments and variable description compulsory.
Answers
Answered by
0
Explanation:
class JavaExample {
public static void main(String args[]) {
int n = 100;
System.out.print("Even Numbers from 1 to "+n+" are: ");
for (int i = 1; i <= n; i++) {
//if number%2 == 0 it means its an even number
if (i % 2 == 0) {
System.out.print(i + " ");
Answered by
1
even_numbers = [str(number) for number in range(50, 101) if number % 2 == 0]
print("\n".join(even_numbers))
Similar questions
India Languages,
2 months ago
Computer Science,
2 months ago
English,
4 months ago
India Languages,
4 months ago
Biology,
9 months ago
Biology,
9 months ago