How many positive integer solutions does the equation 2x+3y = 100 have? a) 50 b) 33 c) 16 d) 35

This question is related to TCS Interview

Questions by nurankl84   answers by nurankl84

Showing Answers 1 - 8 of 8 Answers

Bhuvan Bhoot

  • Jul 16th, 2006
 

16

  Was this answer useful?  Yes

dinesh

  • Jul 17th, 2006
 

what is the answer,how u was sloved, give the soluction plz

  Was this answer useful?  Yes

Siraj Khan

  • Jul 23rd, 2006
 

Its very simple... See by observing that in 2x+3y=100 2x is always even and 100 is also even so u need to have 3y also positive. so within 100 3 can be multiplied by 100/33 times to get an even number. So (b) 33 is the answer.

  Was this answer useful?  Yes

shivakumar007

  • Jul 23rd, 2006
 

private int Validate(int num, int X, int Y) { int temp=0,count=0,counter=Y; while(counter <= num) { temp = num - counter; if(temp % X==0) { count = count + 1; } counter = counter + Y; } return count; } }Use this simple snipet to find for any such equation.Here X=2, Y=3, num=100;will give 16

  Was this answer useful?  Yes

uday reddy

  • Jul 30th, 2006
 

there is a simple way to answer this kind of Q's given 2x+3y=100, take l.c.m of 'x' coeff and 'y' coeff i.e. l.c.m of 2,3 ==6then divide 100 with 6 , which turns out 16 hence answer is 16short cut formula--- constant / (l.cm of x coeff and y coeff)

RAJKUMAR

  • Mar 16th, 2007
 

2x+3y=100

x =50-3y/2

put y=2z ... z is +ve integer..so y will b +ve and integer

x=50-3z, x >0 ,so 50-3z>0
z<50/3... z<16.1

s0 z=0,1,2,.....,16
totaly 17 solution ...

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions