answersLogoWhite

0


Best Answer

import java.util.*;

class Demo

{

public static void main(String args[])

{

System.out.println("Even Numbers Are ");

for (int i=1;i<=20;i++)

{

System.out.print(" "+(2*i));

}

System.out.println("\n \n Odd Numbers Are ");

for(int j=0;j<=20;j++)

{

System.out.print(" "+((2*j)+1));

}

}

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Without using mod operator find the even or odd?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you write find out the power of a number without using operator and predefined functions?

With repeated multiplication.


How you can find a factorial of a number without using multiple operator?

If you really wanted to do this, you could simulate multiplication with repeated addition.


How do you find the greatest of three numbers using ternery operator?

Compare the first two numbers with the ternary operator. Store the result in a temporary variable. Compare the temporary variable with the third number, again using the ternary operator.


Write a c program to find the product of two numbers without using operator?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int a,b,multi; clrscr(); printf("enter a value for a and b"); scanf("%d%d",&amp;a,&amp;b); multi=a*b; printf("the result is %d", multi); getch() }


How do you find largest of two object using operator overloading in c?

I will not use operator overloading in C# to do anything. Operator overloading may lead to one operator has more than 1 semantic meaning. For example, we know 1 + 2 yields 3, and "1" + 2 yields "12". I do not like this overloading of the operator + being used for addition in Number hierarchy, while as the concatenation in strings. That is, one operator (+) has 2 significant semantics.And the question "find largest of two object" is too vague - what do you mean "largest"? and object? We know apple and orange are 2 objects, but how do you compare them, and find the largest one?????? (size, price or what???)

Related questions

How do you write find out the power of a number without using operator and predefined functions?

With repeated multiplication.


How you can find a factorial of a number without using multiple operator?

If you really wanted to do this, you could simulate multiplication with repeated addition.


How do you find the greatest of three numbers using ternery operator?

Compare the first two numbers with the ternary operator. Store the result in a temporary variable. Compare the temporary variable with the third number, again using the ternary operator.


How do you perform multiplication of two numbers without using the multiplication operator?

By using repeated addition. Consider two numbers a and b. If you want to find a*b then you can add the numbers repeatedly in a loop to get the product. Eg:product = a;for( i=1; i


Write a c program to find the product of two numbers without using operator?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int a,b,multi; clrscr(); printf("enter a value for a and b"); scanf("%d%d",&amp;a,&amp;b); multi=a*b; printf("the result is %d", multi); getch() }


How do you find out if a girl has a boyfriend without talkin to her?

Get your friends to ask her without using your name.


In Pokemon dimond where can you find a combee without using a honey tree?

there is no way else to get a combee without using a honey tree


What are the goal of environmental?

find it in glossary do your homework without using this


How do you find largest of two object using operator overloading in c?

I will not use operator overloading in C# to do anything. Operator overloading may lead to one operator has more than 1 semantic meaning. For example, we know 1 + 2 yields 3, and "1" + 2 yields "12". I do not like this overloading of the operator + being used for addition in Number hierarchy, while as the concatenation in strings. That is, one operator (+) has 2 significant semantics.And the question "find largest of two object" is too vague - what do you mean "largest"? and object? We know apple and orange are 2 objects, but how do you compare them, and find the largest one?????? (size, price or what???)


Where can I find listings of employment opportunities for a crane operator?

www.monster.com and www.careerbuilder.com will help you find job opportunities for a crane operator in your area.


What is the rarest Pokemon you find in diamond without using cheats?

Darkrai.


C program to find the largest among three numbers using ternary operator?

max = a &gt; b ? a : b; max = max &gt; c ? max : c;