Created
April 23, 2012 07:09
-
-
Save robnolen/2469302 to your computer and use it in GitHub Desktop.
CS 36 C Final Output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[iceberg@oh ~]$ more output1.txt | |
Please enter a stock name, or zero to end: Stock name is Clippers | |
Please enter a number of shares: Please enter the buy price: Please enter the current price: Please enter the fees: | |
Please enter a stock name, or zero to end: Stock name is Spurs | |
Please enter a number of shares: Please enter the buy price: Please enter the current price: Please enter the fees: | |
Please enter a stock name, or zero to end: Stock name is Lakers | |
Please enter a number of shares: Please enter the buy price: Please enter the current price: Please enter the fees: | |
Please enter a stock name, or zero to end: Stock name is Celtics | |
Please enter a number of shares: Please enter the buy price: Please enter the current price: Please enter the fees: | |
Please enter a stock name, or zero to end: Stock name is Suns | |
Please enter a number of shares: Please enter the buy price: Please enter the current price: Please enter the fees: | |
Please enter a stock name, or zero to end: | |
Printing sorted array | |
--------------------------- | |
Stock name is Celtics | |
Stock name is Clippers | |
Stock name is Lakers | |
Stock name is Spurs | |
Stock name is Suns | |
Printing calcuation data: | |
------------------------------ | |
Stocks that were profitable: 2 | |
Stocks that were even: 0 | |
Stocks that were un-profitable: 3 | |
Total profit: 3490.949951 | |
Printing data after read/write binary | |
------------------------------- | |
Stock name is Celtics | |
Initial Cost is $931.50 | |
Current Cost is $925.50 | |
Profit is $-6.00 | |
Stock name is Clippers | |
Initial Cost is $204.50 | |
Current Cost is $499.50 | |
Profit is $295.00 | |
Stock name is Lakers | |
Initial Cost is $9082.50 | |
Current Cost is $12691.25 | |
Profit is $3608.75 | |
Stock name is Spurs | |
Initial Cost is $3394.05 | |
Current Cost is $3063.75 | |
Profit is $-330.30 | |
Stock name is Suns | |
Initial Cost is $619.50 | |
Current Cost is $543.00 | |
Profit is $-76.50 | |
Printing data after read/write text | |
------------------------------- | |
Stock name is Celtics | |
Initial Cost is $931.50 | |
Current Cost is $925.50 | |
Profit is $-6.00 | |
Stock name is Clippers | |
Initial Cost is $204.50 | |
Current Cost is $499.50 | |
Profit is $295.00 | |
Stock name is Lakers | |
Initial Cost is $9082.50 | |
Current Cost is $12691.25 | |
Profit is $3608.75 | |
Stock name is Spurs | |
Initial Cost is $3394.05 | |
Current Cost is $3063.75 | |
Profit is $-330.30 | |
Stock name is Suns | |
Initial Cost is $619.50 | |
Current Cost is $543.00 | |
Profit is $-76.50 | |
Printing text file | |
------------------------------- | |
Celtics 75 12.340000 12.340000 6.000000 931.500000 925.500000 -6.000000 | |
Clippers 150 1.330000 3.330000 5.000000 204.500000 499.500000 295.000000 | |
Lakers 355 25.549999 35.750000 12.250000 9082.500000 12691.250000 3608.750000 | |
Spurs 215 15.770000 14.250000 3.500000 3394.050049 3063.750000 -330.300049 | |
Suns 50 12.360000 10.860000 1.500000 619.500000 543.000000 -76.500000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment