• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

Has anyone started on COMP115 Assigment 1? I need help! (1 Viewer)

TheDreamer

New Member
Joined
Mar 10, 2004
Messages
20
argh. I've got all the syntax right and no errors but
everytime, I input dimensions like 12 345, the output is always P1!! I must be missing something...
 

jlh

sooner or later...
Joined
Mar 15, 2003
Messages
1,755
Location
Sydney
Gender
Male
HSC
2002
are all your inputs resulting in P1?? are you using an IF;ELSE IF statement?? you must of made a mistake somewhere... *thats pretty obvious* LOL...
 

Rahul

Dead Member
Joined
Dec 14, 2002
Messages
3,647
Location
shadowy shadows
Originally posted by TheDreamer
argh. I've got all the syntax right and no errors but
everytime, I input dimensions like 12 345, the output is always P1!! I must be missing something...
have you made like an algorithm [or planned] that would check both the dimensions that are needed to both the dimensions of the planks?
i havent really started it, so i am not sure.
 

jlh

sooner or later...
Joined
Mar 15, 2003
Messages
1,755
Location
Sydney
Gender
Male
HSC
2002
Originally posted by jezzmo
yeh same! whenever i click the link off the actual Week 2 practical page, it's a dead link.
uh copy and paste the link to your browser.. theres probably a mistake on the linking of the html code on the website..
 

jlh

sooner or later...
Joined
Mar 15, 2003
Messages
1,755
Location
Sydney
Gender
Male
HSC
2002
Originally posted by Rahul
have you made like an algorithm [or planned] that would check both the dimensions that are needed to both the dimensions of the planks?
i havent really started it, so i am not sure.
you dont really need to plan anything.. you can do it all with an ifelseif statement...
 

Orange Juice

so worthless i am
Joined
Nov 23, 2002
Messages
3,886
Location
Room 112
Gender
Male
HSC
2007
dam ... everything i enter say 100 200 for the dimensions the results i get is,,,
not in stock
P1
ahhhh!
 

Orange Juice

so worthless i am
Joined
Nov 23, 2002
Messages
3,886
Location
Room 112
Gender
Male
HSC
2007
can someone explain this from the assignment website..
Sample input 2:

41 25

Sample output 2:

P3

... that doesnt make sense to me
 

Rahul

Dead Member
Joined
Dec 14, 2002
Messages
3,647
Location
shadowy shadows
the program has to find the plank that it can use.
so it will find the plank which will have both greater dimensions.

plank 3 has dimensions 30 by 120. which is geater than or equal to the dimensions required.
 

Rahul

Dead Member
Joined
Dec 14, 2002
Messages
3,647
Location
shadowy shadows
Originally posted by Orange Juice
can someone explain this from the assignment website..
Sample input 2:

41 25

Sample output 2:

P3

... that doesnt make sense to me
Originally posted by jlh
http://teaching.ics.mq.edu.au/units/comp115/whatsnew.html

[March 3rd] There was a mistake in an example given for the first assignment. When the dimension are 41 25 then the output of the program should be P3 and not P2
i dont think thats the reason why orange juice is confused...
 

pb

Inside The Hollow
Joined
Jan 20, 2004
Messages
775
Location
Westie!
Gender
Female
HSC
2003
I haven't even tried the assignment... I can't even do Task 3 in Prac 2


Uhh... ok I just did Task 3... I dl'ed it last week and it was something abt Faranheit (w/e) and celsius and that's what i was doing then i went to check it again and it was the x,y thing! Why did they change it when i was nearly done!?!
 
Last edited:

TheDreamer

New Member
Joined
Mar 10, 2004
Messages
20
Uh sorry pb, don't know how to help you there hehe

Anyways, I get the same output as Orange Juice!! It's very frustrating isn't it? Well, might as well put down an example here so you guys can actually see what I'm missing.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <iostream.h>
#include <stdlib.h>


int main()
{

int month,December,August,September;

cout<<"Enter the month of your birthdate"<<endl;
cin>>December>>August>>September>>month;
if(month=December)
cout<<"If you were born in December,it is Summer "<<endl;
else if(month=August)
cout<<"If you were born in August,it is Winter." <<endl;
else if (month=September)
cout<<"If you were born in September, it is Spring."<<endl;


system("PAUSE");
return 0;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`

In this case, I keep getting" If you were born in December,it is Summer" .

You can copy the above eg. and test it out yourself.

NOTE: Just realised the computer doesn't even like me. The code on this posted message is DIFFERENT to my original. If any of you guys can help me, please give me your email address, and I'll send it to you there. It shouldn't mess up then. Thanks heaps.
 
Last edited:

boinkBOINK

hustler
Joined
Feb 5, 2003
Messages
862
Gender
Undisclosed
HSC
N/A
hay orange juice im having the same prob with u
im confuzzled with this assignment =\
when i type eg 40 120 it comes up as not in stock=\
cause no plank IS 40 120?
i think im missing something =\
 

Orange Juice

so worthless i am
Joined
Nov 23, 2002
Messages
3,886
Location
Room 112
Gender
Male
HSC
2007
Originally posted by boinkBOINK
hay orange juice im having the same prob with u
im confuzzled with this assignment =\
when i type eg 40 120 it comes up as not in stock=\
cause no plank IS 40 120?
i think im missing something =\
not exacly the same... i get P3

i meant before BY..
if the dimensions are 1 cm by 2 cm... shouldnt 2 cm by 1 cm be the same?
hence 25 41 = 41 25
 

boinkBOINK

hustler
Joined
Feb 5, 2003
Messages
862
Gender
Undisclosed
HSC
N/A
oh =\
i thikn mine looks too simple
for anyone whos like finished pretty much
how many lines of code do u guys have?
top to b ottom?
 

Orange Juice

so worthless i am
Joined
Nov 23, 2002
Messages
3,886
Location
Room 112
Gender
Male
HSC
2007
i THINK mine is finished cept for the sample 2 where its 41 25... is still get P5.. which to my stupid self seems right...
ive got ....35 lines
from the top (name) to the end (end main)


does anyone know how this computer marking thingy works... cuz i dun wanna mess it up! i need a gpa of 2.5!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top