Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / some help on a couple of programming I problems...

Author
Message
Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 15th Dec 2010 19:25
I've got these 3 programming problems i need to do for my class and i can't seem to get all of them. here they are:



2:



3:



not trying to get u guys to do the homework for me, lol just need some advice and or refrence where i can find how to do these

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
Oolite
19
Years of Service
User Offline
Joined: 28th Sep 2005
Location: Middle of the West
Posted: 15th Dec 2010 19:54
Quote: "not trying to get u guys to do the homework for me, lol just need some advice and or refrence where i can find how to do these"

But you are, you just posted the questions up and not any specific part that you are stuck on.

These are all pretty self explanatory on what you have to do though, so maybe learn how to do some basic maths within c++?

heyufool1
16
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 15th Dec 2010 21:25 Edited at: 15th Dec 2010 21:27
Well I did a factorial method as a side thinger in my class today so I'll just type that up for you to analyze.

It's written in java but it should be almost identical or identical to what yours should be.



"So hold your head up high and know, it's not the end of the road"
Impulse Game Engine
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 17th Dec 2010 06:03
along with knowing how to create a function that returns a value, you need knowledge of for-loops (or while loops - either can create the desired functionality), and variables, to complete the first two assignments. If you're asking how to complete them... Please stare at the computer screen longer, because if they're assigned to you, you should know how to do them, and these are basic exercises!

The first two are simple, the last one is a bit more complicated. Look into integer math (IE 23/5=4), and think about how you could use its properties to figure out if a number can be divided by anything else.

Lover of games
20
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 19th Dec 2010 18:37
funny thing is i understad function and for loops, it's solving a problem i got a bit of trouble with :-p my teacher said he was amazed at how i was using functions before we even talked about them :-p

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack

Login to post a reply

Server time is: 2025-05-24 01:47:04
Your offset time is: 2025-05-24 01:47:04