Hey programming/math gurus, I need some help. Not hard, but may be tedious =/ !
i'm just a cheerleader
Okay i had this assignment (attached), and I just finished my program. Now I need to compare my results with the professor's results.
Here are the two files:
Okay now can you guys play around and enter some values and see if my proggie gives the same results as the professor's
hey bahrom thats really cool
wow how do you even make a program into dos like that? we do call that dos right?
yea.. and that's like really basic stuff.. took me like 3-4 hours..
whats this class called? programming?
It's making those nice (non-dos, or however you call those programs) is hard.. Yeah it's called Algorithms and Computer programming
are you a computer science major?
No I'm a math major, wanna minor in programming.. A deadly weapon to get the job haha!
actually a deadly combination of weapons.
i hope someone will come to help with the program lol because i know nothing :(
do you want me to run tests to see if you and your professor i have the same outputs for inputs?
yea
LOL no myininaya i'm done with it. I just want to check if the answers I get are correct. I actually already tested for the first option. Like run my program right. When it asks you for a choice press 3, and then enter a random number like 55890. Then you will get the output. Then open my professor's version and again press 3 and enter the number 55890 again. Compare the answers u get
k
sorry the post right above this was meant to be posted earlier. So yea that's basically what i want u to do. just run tests
actually myininaya hold on.
holding...
Let me give u which numbers to test. I already tested this for two programs, so my head is spinning, especially after writing and editing 181 lines of code.. so I will give you 12 numbers to test. gimme a second. those are the ones that are split into intervals basically that's why i need to make sure they work. so if that works, then everything in between will work too
gimme 2-3 minutes
k i have started my stop watch
jk i don't have one
okay here we go
0 1000.99 8375 10021.87 34000 50781.6 68650
test these meanwhile.. four more numbers coming and that's all
100701.5 104625 150000.9 186825
Okay those are the values that need to be tested
Hey imran it wasn't that bad
Wanna take a look at the source code?
Yeah
okay.. hold up.. it's a .cpp but notepad should open it
Took me like 3 hours haha
lol so how was it? Any nicer/shorter way?
sooooooooooooooo many conditional statements
I knoow man.. that took forever... but there were a $#!tload of conditions
http://assets.openstudy.com/updates/attachments/4e31fa850b8ba7b2da414f03-bahrom7893-1311898304490-assignment1.png See the assignment.. like it has 3 columns basically.. those were what i used as a switch
for 3 all them are good
thanks a lot myininaya!
anyway imran and for each of the 6 intervals on the table I had to write a condition. So i ended up with 18 conditions that was craaazzyyyyy
anyway on to work on the next proggie..
Use function on next program
what do u mean? Well it's like different i have to let the user input four integers and sort them in order, smallest to largest. Your program should sort these numbers using if or if-else statements only
"if or if-else statements only" that sucks, would have been so much easier with for loops
lol I thought so.. anyway this is how I'm trying to do it.. Instead of thinking of all 24 possibilities that the arrangement can be.. i wanna first take the first two integers and put them in order
then take the next two integers and put them in order..
and finally arrange the 2 pairs in order again..
I am writing my own program in mathematica
good.. imran let's go to a new thread.. i will post the question in a bit
Join our real-time social learning platform and learn together with your friends!