Computer Science, asked by aaditee187, 1 year ago

Write a java code to print odd numbers from 1 to 10.

pls answer this fast​


OMMSINGH: class OddNumber {
public static void main(String args[]) {
System.out.println("The Odd Numbers are:");
for (int i = 1; i <= 100; i++) {
if (i % 2 != 0) {
System.out.print(i + " ");
}
}
}
}

Answers

Answered by FelixDan
1

I think you know the introduction of writing import java. io..... So I'm posting the main part

Attachments:

aaditee187: Ya I know the introduction part
FelixDan: If you find reliable then you mark it brainless plz
FelixDan: Sorry it's brainliest.. Upps! By mistake
Similar questions