C++ really annoying project, ISO idea's

Status
Not open for further replies.

nattan

Old School
Original poster
old school
coldschool
member
Joined
Sep 30, 2010
Posts
410
Reaction score
37
Points
282
CLOSED

well I havn't even started working on this because of a few conditions

i need to create a program to solve a mode with out using an array

what it should do, take a string of numbers add them, calculate the number that is most repeated back to back and display that

while this is for a class I'd appreciate some ideas on where to start and not straight code, there is more to the lab id just like some ideas to help me solve the mode
 

TheSyndicate

0110100001101001
veteran
senior
member
Joined
May 22, 2011
Posts
2,287
Reaction score
1,345
Points
151
Age
29
Location
Texas
Then use vectors, they're a liiittle different from an array. ;)

In all seriousness though, are you allowed a MAX_INPUT or are you required to allow the user to enter as many numbers as they want?
 

jrgsquash

Member
member
Joined
Jan 30, 2011
Posts
375
Reaction score
18
Points
76
Then use vectors, they're a liiittle different from an array. ;)

In all seriousness though, are you allowed a MAX_INPUT or are you required to allow the user to enter as many numbers as they want?

yay thats what i did for my random generator kinda like random org but i make it generate a thousand or more times for a legit random number
 

nattan

Old School
Original poster
old school
coldschool
member
Joined
Sep 30, 2010
Posts
410
Reaction score
37
Points
282
Then use vectors, they're a liiittle different from an array. ;)

In all seriousness though, are you allowed a MAX_INPUT or are you required to allow the user to enter as many numbers as they want?

users are allowed to enter as many numbers as they want
 

Codez Hybrid

PHP Coder
senior
member
Trade With Caution!
Joined
Dec 29, 2010
Posts
4,756
Reaction score
1,655
Points
89
Location
Indiana, USA
Website
www.offerscript.net
why can't you use an array? how about making the string into an object?
 

Flip

Old School
old school
member
Joined
Jul 23, 2009
Posts
263
Reaction score
69
Points
108
You could use vectors like Syndicate said, but I'm not sure if your professor would enjoy that. I feel like there's some information you're leaving out.

Something like this would work, but I don't know if you're allowed to put these types of restrictions on it.

Code:
Give me a number:  70
Another number not smaller than the previous: 71
Another number not smaller than the previous: 80
Another number not smaller than the previous: 80
Another number not smaller than the previous: 80
Another number not smaller than the previous: 91
Another number not smaller than the previous: 93
Another number not smaller than the previous: -1
Mode is 80.

Putting the must be greater than restriction on makes sure they come in sorted, making it incredibly easy to determine the mode.
 

nattan

Old School
Original poster
old school
coldschool
member
Joined
Sep 30, 2010
Posts
410
Reaction score
37
Points
282
why can't you use an array? how about making the string into an object?
for the challange

You could use vectors like Syndicate said, but I'm not sure if your professor would enjoy that. I feel like there's some information you're leaving out.

Something like this would work, but I don't know if you're allowed to put these types of restrictions on it.

Code:
Give me a number:  70
Another number not smaller than the previous: 71
Another number not smaller than the previous: 80
Another number not smaller than the previous: 80
Another number not smaller than the previous: 80
Another number not smaller than the previous: 91
Another number not smaller than the previous: 93
Another number not smaller than the previous: -1
Mode is 80.
Putting the must be greater than restriction on makes sure they come in sorted, making it incredibly easy to determine the mode.

no we are not allowed to restrict any input
 
Status
Not open for further replies.