2014-05-02, 02:20 AM
InvictHero Wrote:we've done call-by-reference, if that has anything to do with that…haha. but okay, I'll try working on the second option! Thank you so much for all the help! I greatly appreciate it
oh, one last question. I know you've already mentioned how to read in the data, only reading it to the givenorrandom part then having an if/else statement, but could you elaborate on this a bit more or draw it out for me? I'm having trouble grasping this. Like, after the if/else statement, how do i read in the data after the givenorrandom?
basically what i meant by that is:
heres the 2nd part of the data you have on OP:
B
2
G
25 23.5
25 70.5
1000
30
C
3
R
400
35
the first loop works as normal. but I would recommend when inputing to have an if statement checking if the givenorrandom is one or the other. so if its given, read in the values for the numbers, else, randomize the values. what you dont want to do is input the wrong number for the wrong variable(e.g after R is inputed for givenorrandom, you dont want 400 to be read as a measurement1, as its supposed to be the power(?))


