Given: (x-2)(x+3)= 100;

solve the equation for x using any programing language.

Answers were Sorted based on User's Feedback



Given: (x-2)(x+3)= 100; solve the equation for x using any programing language...

Answer / sravan

public class Test {
static int x;
public static void find()
{
for(x=0;x<104;x++)
{
if((x-2)*(x+3)==104)
{
System.out.println(x);
}
}

}
public static void main(String[] args) {


find();

}



}

Answer: 10

Is This Answer Correct ?    1 Yes 0 No

Given: (x-2)(x+3)= 100; solve the equation for x using any programing language...

Answer / sumitpalsingh

/*Given: (x-2)(x+3)= 104; solve the equation for x using any programing language.*/
package classroom.program;

public class SolveProblem {

public static void main(String[] args) {

for(int x=0;x<100;x++)
{
if((x-2)*(x+3)==100)
{

System.out.println(x);
}
}


}

}

//output::=10

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Programming Languages AllOther Interview Questions

hi, all this is shoba m.c.a . i have learned abap but no oppurtunities right now as fresher , right now i want to learn any course on demand any one pls suggest me good course and institute in hyderabad

0 Answers  


I'm trying to solve this. But I'm not figuring the right solution. Can some one help what the answer is for the question below? You can use as many variables as you need, there are no negative numbers, all numbers are integers. You do not know the size of the integers, they could be infinitely large, so you can't count on truncating at any point. There are NO comparisons allowed, no if statements or anything like that. There are only four operations you can do on a variable. 1) You can set a variable to 0. 2) You can set a variable = another variable. 3) You can increment a variable (only by 1), and it's a post increment. 4) You can loop. So, if you were to say loop(v1) and v1 = 10, your loop would execute 10 times, but the value in v1 wouldn't change so the first line in the loop can change value of v1 without changing the number of times you loop. You need to do 3 things. 1) Write a function that decrements by 1. 2) Write a function that subtracts one variable from another. 3) Write a function that divides one variable by another. 4) See if you can implement all 3 using at most 4 variables. Meaning, you're not making function calls now, you're making macros. And at most you can have 4 variables. The restriction really only applies to divide, the other 2 are easy to do with 4 vars or less. Division on the other hand is dependent on the other 2 functions, so, if subtract requires 3 variables, then divide only has 1 variable left unchanged after a call to subtract. Basically, just make your function calls to decrement and subtract so you pass your vars in by reference, and you can't declare any new variables in a function, what you pass in is all it gets.

1 Answers   Microsoft,


what is the purpose of postback?

2 Answers   Nth Solution,


hi friends i am ravi here , i have one problem at starting at the interview that is i have my 3+ it(java) years experiance profile so if i attend the interview interviewer ased me tel me about your profile so i not able to explain because i dont knw where to start and where to end and i dont know what i should tel and what i shouldnot tel .....so can any body please clear m doubts clearly.............please help me friends,i am awaiting for friends reply please.............

2 Answers   TCS,


can u help me? how do solve the transpose problem in ireport? if any one know send to eswaran_2006@yahoo.co.in

0 Answers  






Difference between views and index in sas programming

0 Answers   Ventois,


what is difference between VB5 AND VB6.0

2 Answers   Satyam,


sample and simple coding where we get?

0 Answers   IBM,


What is the worst case of AVL tree?

1 Answers  


Corillian's product is a "Component Container." Name at least 3 component

1 Answers  


cgi stands for

2 Answers   CGI,


How to print No.of.rows affected after updation using ADO.Net

0 Answers   Tech Mahindra,


Categories