Posts
 
Reputation
Joined
Last Seen
Ranked #17
Strength to Increase Rep
+17
Strength to Decrease Rep
-4
93% Quality Score
Upvotes Received
759
Posts with Upvotes
607
Upvoting Members
264
Downvotes Received
56
Posts with Downvotes
52
Downvoting Members
27
328 Commented Posts
~1.52M People Reached
About Me

Spent most of my life in California. Santa Barbara is about as far south as I go. Right now I'm in Santa Rosa.Received a Bachelor's Degree in Math and Statistics, then became an actuary for a while. It was all right, but a little dull. Decided to try…

Interests
Soccer, Rock Climbing, Scuba Diving, Philosophy, World History, Writing and Literature
PC Specs
Dual Core Something or Other, Definitely not top of the line. I mainly tend towards AMD over Intel.…
Favorite Tags
c++ x 4K
java x 1K
c x 200
image x 17
php x 17
Member Avatar for din_hilmi

Five numbers can be ordered 5! or 120 ways. The no-brainer way of writing this code would thus be writing an if statement with 119 "else if" statements, one for each possible ordering. You should be using <= instead of < (what if two elements are the same?). There may …

Member Avatar for Aditya_47
0
44K
Member Avatar for mir_sheely

What would f2f7 be, anyway? Is the smallest negative short in hexadecimal 8000 (corresponds to -2^15) and the largest negative short in hexadecimal ffff (corresponds to -1), so f2f7 is equal to: [code] f2f7 0d08 (flip bits) Add 1 0d09 Convert to decimal and add a minus sign -3337 in …

Member Avatar for Andrey_7
0
2K
Member Avatar for Debby0424

The code is unreadable. Please format/indent it and use code tags. NetBeans and other IDEs will format the code for you if you want. Code tags are used as follows. All indentation is stripped out if code tags are not used. Please repost with them. [noparse] [code=JAVA] // paste code …

Member Avatar for Batha
0
7K
Member Avatar for NinjaLink

> "Write a program that reads in ten numbers to an array. The program then reads the array and displays distinct numbers (i.e. if a number appears multiple times, it is displayed only once)" > > for example: > > `1 2 3 4 5 5 6 7 8 8 …

Member Avatar for Nor_492
0
7K
Member Avatar for kittycat07us

[QUOTE=kittycat07us;785518]Hi, I'm having trouble with creating a program to split a number into there own separate digits and then multiplying the digits to create another number. The program will repeat itself until there is just one digit.. The main thing I'm having problem with is figuring out how I could …

Member Avatar for Hassan_39
0
11K
Member Avatar for computer engW

[QUOTE=computer engW;614105]Could any one answer my questions??[/QUOTE] I can't figure out what the questions are. The code you posted draws a triangle. Change it slightly to draw a square: [code=cplusplus] int main() { int n = 4; int line, loop; for (line = 1; line <= n; line++) { for …

Member Avatar for movies8time8
0
8K
Member Avatar for Climber Ty

[QUOTE=Climber Ty;] For some reason it automatically shows all the nodes. Maybe I haven't totally grasped the concept of traversing, because I am thinking it will only show one at a time and I know my code isn't exactly right.[/quote] Well, what do you WANT the "traverse" function to do? …

Member Avatar for JamesCherrill
0
6K
Member Avatar for brettw02

[QUOTE=brettw02;538790]Ok this is great... I am only unsure of one thing here --» I am a little unsure of the reason for [number - 1] -- Im sure im just overlooking something rather simple...[/QUOTE] The 1 is subtracted because in C++ array indexes start at 0 and your loops: [code=C++] …

Member Avatar for Jaynish
0
3K
Member Avatar for kanebt

> All IP addresses used to register and ***post*** They all make sense to me except for keeping track of the IP address for every single post. Why would provng you aren't spamming require that you keep track of the IP from every single post? I have thousands of them. …

Member Avatar for Олег_9
3
3K
Member Avatar for hollywoood69

[QUOTE=hollywoood69;984746]So i have been at this program for hours....and still no luck. I have made the changes that were suggested...but i get an answer of inf.....not sure what to do from here. any help[/QUOTE] [code=cplusplus] double mortgagePayment::tPayment(double principle, double term, double interest) { term = 0; int years = term …

Member Avatar for Yasin_4
0
2K
Member Avatar for brittany435

[QUOTE=Compton11;569810]Brittany, you can't do cin >> number[i]..That will not read a value and store it in the array...Do something like this: ...Remember to add to my reputation! [code] cin >> num; numbers[i] = num; [/code] [/QUOTE] [code] cin >> numbers[i]; [/code] works fine. The way you did it works too, …

Member Avatar for Reverend Jim
0
3K
Member Avatar for sheltask

Trying to program a snake game if you can't make yourself understand classes is a recipe for disaster. Ditto linked lists and binary trees. There's a natural progression in C++: "Hello World", print your name, count to 10, count to however high the user wants, functions, arrays, pass-by-reference-versus-value, pointers, structures, …

Member Avatar for Less_1
1
824
Member Avatar for samsons17

[QUOTE=samsons17;1038634]does anyone know how to do the program that are more or less like peteranswers?? This is the website which has been using to trick people... [URL="http://www.peteranswers.com/"]http://www.peteranswers.com/[/URL] and this is the secret : [URL="http://chriswondra.com/2007/02/21/peter-answers-the-secret/"]http://chriswondra.com/2007/02/21/peter-answers-the-secret/[/URL] i'm just wondering if i'm capable to do just a simple program that is similar like …

Member Avatar for AssertNull
0
1K
Member Avatar for Sasquadge

That gets rid of the compile error by expanding the scope of monkey but that doesn't solve the real problem, which is that the OP should not have been using monkey on lines 116 and 150 in his original post in the first place. monkey is being used as a …

Member Avatar for Muhammad_107
0
2K
Member Avatar for Megaz221

That works, though it doesn't match what Ancient Dragon had in mind. His idea has the menu function also asking for the choice from the user. You could have a function that just displays it or one like his that asks for the choice as well. If you want to …

Member Avatar for Muhammad_100
3
14K
Member Avatar for payara111

[QUOTE=payara111;865657]How can i print it recursively with one helper function? [img]http://img2.imageshack.us/img2/1690/recursive.th.jpg[/img] Here, n will always be a power of 2 and c will be indicating the column number from which to start the output. The above pattern has been produced with the initial function call RecursivePattern(8,1) It prototype should be …

Member Avatar for Chetana_1
-1
2K
Member Avatar for .It.

To the OP, How can responding to help in such a way (and it WAS help, it wasn't trolling) possibly get you closer to the answer, which presumably is what you are looking for? There are twenty million ways of writing any program. HOW you write it depends on WHAT …

Member Avatar for overwraith
0
5K
Member Avatar for Hoofy

Not sure what the question is, but presumably if the code above is in a function called: [code] int checkWinner() [/code] you would harness the return value like this: [code] int returnValue = checkWinner(); if(returnValue == 79) { // code for when O wins } else if(returnValue == 88) { …

Member Avatar for Jamie_9
0
1K
Member Avatar for playst205

[QUOTE=playst205;614157]Thanks for the help ill see if it helps and ill contact you if it dusnt when ur online ANYONE ELSE READING THIS FEEL FREE TO GIVE ME YOUR RESPONSES FROM YOUR OPINION THANks[/QUOTE] As others have said, the error is clear, though it can be time-consuming to track down. …

Member Avatar for kuroshmokhtari
0
8K
Member Avatar for tiger86

You could certainly write a C++ program that could send the following output to stdout: [code] <html> <body>Hello World</body> </html> [/code] but I imagine you'd have to stick it in the cgi-bin folder and type [url]http://somesite/cgi-bin/helloword.cgi[/url] in the browser. If you stick it in the html folder and try to …

Member Avatar for zelrick
0
3K
Member Avatar for VernonDozier

I have a Yahoo website that uses phpMyAdmin. I've been given the directive "Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem!" I do not know how to run this script (or any script) through phpMyAdmin. I've been looking online and …

Member Avatar for Nishant_3
0
3K
Member Avatar for wakesin

You need a nested loop. The trick in these(always) is to figure out what the loop counter boundaries are. [code] int i, j; for(i = ?; i < ?; i++) { for(j = ?; j < ?; j++) { cout << " "; } for(j = ?; j < ?; …

Member Avatar for Rock426
0
6K
Member Avatar for mattybennett

[QUOTE=mattybennett;660320]Simple - because I must. I have been designing the application in question on paper (process and maths side) but recognise that I am weak on programming. That doesn't mean that I should not attempt it.[/QUOTE] You're tackling a huge project without having the fundamentals. I'm not saying don't attempt …

Member Avatar for joel.queiroz
0
2K
Member Avatar for VernonDozier

OK, I have been experimenting around with GridBagLayout and I'm getting the hang of it. Things are looking the way I want them to on the INITIAL drawing of the GUI. However, when I RESIZE the JFrame to make it smaller vertically, at a certain point, the proportions get skewed. …

Member Avatar for Doogledude123
0
4K
Member Avatar for alyssa.wilkins.77

Sounds like you might want to consider changing majors. If you don't think you have an aptitude for programming, I think that's going to cause problems graduating with a CS degree. There are some darn good coders out there who aren't that great at the algorithms, etc. that are also …

Member Avatar for Mya:)
0
368
Member Avatar for cassie_sanford

[code=cplusplus] #include <iostream #include <iomanip> using namespace std; //function prototypes double patientcharges(int, double, double, double); //in- patient double patientCharges(double,double); //out-patient int main() { char patientTye; //I = in-patient; //O = out-patient; int days; //num days of hospital stay double roomRate; //Daily room rate double medication; // Total medication charges double …

Member Avatar for rafiq_1
0
825
Member Avatar for salamjamal10

>> Untill here everything is working good with me Looks good here too. >> but on line 6 I got confused. What happened to line 5? And what do these numbers represent? What's in the queue or what's in the variables? >> I got[B] 4 5[/B] Again, "got" needs to …

Member Avatar for saeid_h
0
156
Member Avatar for eortiz10

Correct way. double fallingDistance1() // no need for any parameters { double d=0.5*9.8*t*t; return d; } d = fallingDistance1(); // harness the return value The way you had it... double fallingDistance1(double d) // no need for any parameters { d=0.5*9.8*t*t; return d; } fallingDistance1(d); There's no point returning a value …

Member Avatar for klikendish
0
2K
Member Avatar for Scooterman1

>> it's almost working but it seems to be ignoring the first character of the second string. Throw more stuff at it till you can verify this. Scramble the word "computer" and see if it always misses the same letter(s). Instead of "computer", use strings like "abcdefghij" and "jihgfedcba" until …

Member Avatar for asmita.saha.1
0
4K
Member Avatar for ziggystarman

Looks like good old-fashioned round-off and/or overflow error. I changed things to integer types and got rid of the pow, ceil, and abs calls and they match. [code] /********************************************************** Diffie–Hellman key exchange algorithm ------------------------------------- This program demonstrates the Diffie-Hellman exchange key algorithm Tips to improve security ------------------------- [1] Pseudo random …

Member Avatar for logicslab
0
989