Using Module operator, write a java program to print odd number between 0 and 1000
1 answer:
Answer:
class OddNumber
{
public static void main(String args[])
{
int n = 1000; //Store 1000 in Variable n typed integer
System.out.print("Odd Numbers from 1 to 1000 are:"); // Print headline of output window
for (int i = 1; i <= n; i++) //For loop to go through each number till end
{
if (i % 2 != 0) //check if number is even or odd.Not divisible by 2 without reminder means it is odd number
{
System.out.print(i + " "); //print odd numbers
}
}
}
}
You might be interested in
The word that goes in the blank is "unstructured."
Answer:
C. Fields
Explanation:
Fields are used to store all the data in a database.
Answer:
Transaction Manger
Explanation:
Transaction Manger
Transaction Manager is responsible for transaction between resources that are available. It works as interface to support remote access form other systems in Data base management system.
Answer:
1. View, show
2. to the right
Explanation:
On edg
xxxxxxxxxxxxxAnswer:
xxxxxxxxxxxxxxxExplanation: