| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
thanx everyone...there are a lot of programming experts down here
|
|
#2
|
||||
|
||||
|
Ok, first off how urgent is this, like is it due tomorrow? Second off let me see if I got this right. You need to read the data from a text file and have the program calculate the test results and display them or do you need to out put a seperate file for the results?
![]() |
|
#3
|
|||||
|
|||||
|
Something like this?
c Code:
__________________
This is my code. Is it not nifty? "The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools." ---Douglas Adams Join the Itsacon fanclub! Zero Tolerance: Spammers banned so far: 275
![]() Last edited by Itsacon : September 28th, 2005 at 04:50 AM. Reason: typo |
|
#4
|
||||
|
||||
|
|
|
#5
|
|||
|
|||
|
So now we are making homework for others?
To my opinion one should show some code he has, and must point out where he got stuck. Building a complete solution from scratch will not help him learn anything... Not that I can help myself sometimes ;-). |
|
#6
|
||||
|
||||
|
Yeah well, if we don't give him the code, he'll copy it off a classmate :-)
Besides, little parsers like this are so damn easy, I consider it a waste not to write them :-) As for the points, I believe you can only give a certain amount of points to one user within a certain timespan. See here |
|
#7
|
|||
|
|||
|
Thanx Guys, You Saved me.. :)
Quote:
oh it supposed to be due in about 8hours time from when u last posted... anyway the program that u wrote is perfect...its works...thanx u just saved my ass..hahaha |
|
#8
|
||||
|
||||
|
Why did you remove your original post?
This way, this thread is of no use to other users anymore. |
|
#9
|
||||
|
||||
|
Original post.
To all latecomers, bigdaddy had a homework assignment he was too noob to understand, which essentlially was:
How to convert: Code:
Input
3 // number of substances 5 // number of experiments for first substance 50 50 // in angle and out angle for first experiment 40 41 // etc 30 30 10 9 60 60 2 // number of experiments for second substance 35 26 63 42 3 // etc 20 8 50 18 71 23 To: Code:
Output
Substance No.1 Data No.1 Angles(in:50, out:50) Rindex = 1.00 Data No.2 Angles(in:40, out:41) Rindex = 0.98 Data No.3 Angles(in:30, out:30) Rindex = 1.00 Data No.4 Angles(in:10, out:9) Rindex = 1.11 Data No.5 Angles(in:60, out:60) Rindex = 1.00 Average Rindex = 1.02 Substance No.2 Data No.1 Angles(in:35, out:26) Rindex = 1.31 Data No.2 Angles(in:63, out:42) Rindex = 1.33 Average Rindex = 1.32 Substance No.3 Data No.1 Angles(in:20, out:8) Rindex = 2.46 Data No.2 Angles(in:50, out:18) Rindex = 2.48 Data No.3 Angles(in:71, out:23) Rindex = 2.42 Average Rindex = 2.45 Substance No.3 has the maximum refraction index of 2.45 Where a Refraction index is calculated as: Rindex = sin(in) / sin(out) (in & out in degrees) |
|
#10
|
||||
|
||||
|
Im not fast enough
I started trying to help this guy last night. Planning on helping him, but then I slept in, and ya'll just attacked this question. Most of the time a thread stays up for a couple of days before being answered even if there urgent. =) lol but anyway I probably could have done it as good anyways
![]() |
|
#11
|
||||
|
||||
|
Doing someone else's homework goes against my beliefs
Hopefully the answers here should help future students in discovering their own solutions. |
|
#12
|
||||
|
||||
|
YA MadCowDzz
I'm a student, Not in my core classes yet, or my programming classes yet So I like when ppl join only to post one or two homework assignments cause it lets me see the difficulty level that maybe some of my assignments might be like once I get there < |