Computer Science, asked by subbagugulothu, 4 months ago

write a
program
to display the set of even number from
50 to 100 Comments and variable description compulsory.​

Answers

Answered by kvenky2834
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 valeriy69
1

\small\mathsf\color{pink}{Solution\: using\: python\: 3}

even_numbers = [str(number) for number in range(50, 101) if number % 2 == 0]

print("\n".join(even_numbers))

\small\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions