Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a lil problem for u all to solve
Author Message
dedat
I also poo when hungry.

Posts: 1,319.1315
Threads: 32
Joined: 14th Apr 2007
Reputation: 1.65351
E-Pigs: 3.5147
Offline
Post: #24
RE: a lil problem for u all to solve
ZiNgA BuRgA Wrote:Lol, trial and error, not bad :P

Of course, a simple program would've always worked:

C Code
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
int main()
{
	float a, b, c;
	for(a = 1; a<=200; a++)
		for(b=1; b<=34; b++)
			for(c=1; c<=10; c++)
				if(a+b+c == 100 && 0.5*a+3*b+10*c == 100)
				{
					printf("Answer is a=%d, b=%d, c=%d", a, b, c);
				}
	return 0;
}


Was trying to find a mathematical solution.
I'm sure it works, just I'm not bothered.


Good job cR@Zy!NgLi$h - you smart cookie (hai clever confectionary) :D
So u_c_taker, managed to skip doing your homework?


damn you and your programming abilities zinga!!
lol, was it homework u_c?
(This post was last modified: 27/01/2008 02:37 AM by dedat.)
27/01/2008 02:32 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: a lil problem for u all to solve - dedat - 27/01/2008 02:32 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: