Search:
Type: Posts; User: TLEJ
Search:
Search took 0.01 seconds.
-
March 27th, 2012, 01:36 AM
-
February 1st, 2012, 04:32 PM
Exactly; that's what I mean by useless. The assigned program is useless for any binary with more than 19 digits. The way you are wanting to do it would be useful.
-
February 1st, 2012, 04:22 PM
You're right, this forum doesn't seem to have them, haha..
-
February 1st, 2012, 04:15 PM
The only length restriction is the limit of the int value. If you want to see how I did it, shoot me a PM. Yeah, I see what you are saying though. It's a pretty useless program, but whatever.
-
February 1st, 2012, 04:11 PM
You're misinterpreting what I and clemsonfight are asking. We are not looking for a specific function. It's purely a logical test with your mind. All it is was 3 lines of math functions in a loop....
-
February 1st, 2012, 04:04 PM
Well what you've got to do is exactly what you think.. Basically, divide the binary by 10, get the remainder, times it by the position (Which would be the.. (1,2,4,8,16,...) (Which is a variable that...
-
February 1st, 2012, 03:36 PM
Yes, we probably are considering your name has Clemson in it! (TCTC?)
Yeah, this is stupid hence we're not allowed to use any new functions or arrays for that matter..
I'm completely stumped.....
-
February 1st, 2012, 03:26 PM
I DON'T want you guys to do this for me!... I just need to know HOW to do it. It's difficult taking a DECIMAL input, and treating it like it's BINARY. Then CONVERTING it to decimal.
I'm not...
-
February 1st, 2012, 03:12 PM
I can only use what I've learned so far. NO new functions. ONLY the ones I listed in the first post.
-
February 1st, 2012, 02:56 PM
How would I do that? I am brand new to c++.. Can you type some code where I have the question marks to show me what you mean?
-
February 1st, 2012, 02:39 PM
Sorry for the double post, (Don't know how to edit) but, here's what I have so far: (AND YES, it HAS to be in THIS format..)
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{...
-
February 1st, 2012, 02:28 PM
I just meant I know how to convert any binary to decimal on paper... Not with arrays... not like a flow chart, just math, lol.
101(binary) = (1*4)+(0*2)+(1*1) = 5(decimal)
-
February 1st, 2012, 01:54 PM
So I need to write a simple program that takes the user input (int) (Which will be in binary) , and outputs the decimal equivalent.
All we have learned so far is printf, scanf_s, if, do, while,...
|
Click Here to Expand Forum to Full Width
|