Follow us on Twitter!
Few are those who can see with their own eyes and hear with their own hearts. - Albert Einstein
Saturday, April 19, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 70
Guests Online: 65
Members Online: 5

Registered Members: 82839
Newest Member: fezphantom
Latest Articles
View Thread

HellBound Hackers | Events | General

Author

c++ questions


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-01-08 01:01
1) What's the difference between int and double?

2) Why does 12% 5 = 2?

- thanks


Author

RE: c++ questions

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 25-01-08 01:05
int = intager == a whole # (e.g. 2)

double = a decimal (e.g. 11.1)


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: c++ questions

Futility
Member



Posts: 725
Location: USA
Joined: 17.12.07
Rank:
God
Posted on 25-01-08 01:07
You might want to try researching a little by yourself before posting but, since I'm ecstatic that I know the answer, I'm going to try and help.


1) What's the difference between int and double?

int is only real counting numbers. IE: 1,2,3,4 etc
dbl is all the numbers in between. IE: 1.2, 1.3, 1.4 etc

2) Why does 12% 5=2?

% is the way C++ displays modulous. I don't really know how to explain it other than saying it's the remainder. 5 goes into 12 2 times (10) with 2 left over. Thus 12% 5=2. If you know any VB, it is the same as MOD.

Hope I helped. If I'm wrong about modulous, feel free to correct me. (I don't think I am)


i252.photobucket.com/albums/hh11/zanimabean/Zim.png
Futility91@hotmail.com Futility91
Author

RE: c++ questions

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 25-01-08 01:09
ya cuz the first part is almost exactly what i said.


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: c++ questions


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-01-08 01:20
Okay, thanks.

so if I was using " double a, double b; " then it would mean a and b have a decimal in them?

These are the problems I have and the answers. But I don't know how they got them.

12% 5 = 2

20 % 10 = 0

20 % 21 = 20


Author

RE: c++ questions

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 25-01-08 01:21
as far as i can tell it should be

12% 5 = 2

20 % 10 = 0

20 % 21 = 1 <--- only thing i could see wrong


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: c++ questions


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-01-08 01:23
I'm studying for my final tomorrow and there's the question and an answer key.

It says 20 but the 0 was written sloppy and looks like a 1 turned into a 0. I don't know...

So why do first two come out to equal that?


Author

RE: c++ questions


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-01-08 01:25
Nevermind I just understood it.

thanks again Pfft


Author

RE: c++ questions

Futility
Member



Posts: 725
Location: USA
Joined: 17.12.07
Rank:
God
Posted on 25-01-08 01:27
...Didn't I just explain this? Ok, I'm sure it was unclear and/or confusing.
% finds the remainder- the leftovers, if you will.
5 goes into 12 how many times?
2.
5*2=10.
12-10=2.
12%5=2.

@Yours3lf
Maybe-just maybe, I started writing my answer before you, but took the time to be thorough and check my spelling, allowing you to post your crap before me? Nah, that's not possible. I must have just copied your beautiful answer.




i252.photobucket.com/albums/hh11/zanimabean/Zim.png
Futility91@hotmail.com Futility91
Author

RE: c++ questions

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 25-01-08 01:28
your welcome. if you need anymore help pm. (i took a class in java and css ,just wish that it wouldv'e been with js)


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: c++ questions


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-01-08 02:02
yours31f wrote:
as far as i can tell it should be

20 % 21 = 1 <--- only thing i could see wrong


Why on earth would the remainer of 20 divided by 21 be 1? 21 goes into 20... 0 times, with a remainder of 20.

Other than that, decent explanations on double vs. int and modulus... as a further course of action, I would suggest a book on beginning C++.



Author

RE: c++ questions

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 25-01-08 02:09
oh good catch i missed that lol


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: c++ questions

ynori7
Member



Posts: 1486
Location: #valhalla
Joined: 08.10.07
Rank:
God
Posted on 25-01-08 03:36
like someone mentioned before, use google first before asking for help. these questions could have easily been answered with a simple google search.

also, i'm curious as to why you waited until the day before the final to understand these simple concepts. what class is this final for?


halls-of-valhalla.org/images/affiliateLogo.png voodoorage.halls-of-valhalla.org/images/smallLogo.png
i537.photobucket.com/albums/ff338/ynori77/archenemysig1.jpg
ynori7 http://halls-of-valhalla.org
Author

RE: c++ questions


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 25-01-08 04:12
Go to the microsoft home page. Then browse to the C++ video training. They start off with basic syntax and basic logic.

Better get to work if your final is in C++...

EDIT: whoops. I thought you said somewhere it was C++, but it turns out it was Zephyr_Pure's post. microsoft will still get you through what you need though.




Edited by on 25-01-08 04:21
Author

RE: c++ questions

Uber0n
Member



Posts: 1963
Location: Sweden‭‮
Joined: 13.06.06
Rank:
Hacker Level 3
Posted on 25-01-08 06:43
Zephyr_Pure wrote:
Why on earth would the remainer of 20 divided by 21 be 1? 21 goes into 20... 0 times, with a remainder of 20.


Thanks, now I didn't have to explain this myself Pfft


img230.imageshack.us/img230/724/uber0nsig3hj6.gif
http://uber0n.web. . .
Nope http://uber0n.webs.com/