954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Framework to provide input values for java arithmatic/logical/bitwise operators

Is there any framework or sample java code to evaluate an arithmatic / logical / bitwise expression , which will provide the value for input parameters , to make the condition pass.

For example , In the below sample arithmatic condition ,
if the values a=7 and b=6 are passed , the condition will get passed and we'll get "Condition is passed!!!" printed in console.

if( (a>b) && (a<10) && (b>5))
{
System.out.println("Condition is passed!!!");
}

Is there any framework which will give me the value of a and b , taking the expression as input.

anthasuresha
Newbie Poster
2 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

Sounds like high school algebra. Solving an equation with 2 unknowns.
A way would be a brute force nested looping program.

NormR1
Posting Expert
Moderator
6,677 posts since Jun 2010
Reputation Points: 1,138
Solved Threads: 656
 
Sounds like high school algebra. Solving an equation with 2 unknowns. A way would be a brute force nested looping program.

Thanks for the reply.
But the issue is when we have a bigger number count. for eg
if(a>2384762834 && b>9874969459045)
In this case , it will require more time.

anthasuresha
Newbie Poster
2 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: