|
Thread: Vb
-
Jul 31st, 2010, 08:28 AM
#1
Thread Starter
New Member
Vb
Write a program to complete the stated task:
You are offered two salary options for ten days of work. Option 1: $100 per day. Option 2: $1 the first day, $2 the second day, $4 the third day, and so on, with the amount doubling each day. Write a program to determine which option pays better.
-
Jul 31st, 2010, 08:48 AM
#2
Re: Vb
Thread moved from the 'CodeBank VB.Net' forum (which is for you to post working code examples, not questions) to the 'VB.Net' forum
-
Jul 31st, 2010, 08:49 AM
#3
Re: Vb
What have you got so far? We are not just going to do your homework for you
-
Aug 1st, 2010, 09:14 AM
#4
Re: Vb
 Originally Posted by [email protected]
Write a program to complete the stated task:
You are offered two salary options for ten days of work. Option 1: $100 per day. Option 2: $1 the first day, $2 the second day, $4 the third day, and so on, with the amount doubling each day. Write a program to determine which option pays better.
you'd use a for...loop to calculate option 2
option 1 is just $100 * 10
here's a clue - option 2 pays better
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Aug 1st, 2010, 11:53 AM
#5
Re: Vb
I love it when people post their homework and don't even bother to try and hide the fact that they're just copying and pasting the question.
If you find a response helpful then remember to Rate it
Personal website Sam Jenkins
-
Aug 1st, 2010, 12:01 PM
#6
Re: Vb
 Originally Posted by Satal Keto
I love it when people post their homework and don't even bother to try and hide the fact that they're just copying and pasting the question. 
And then when they get the answer, they edit out all of their posts and ask others to do the same.
Which means:
QUOTE!!!!
 Originally Posted by [email protected]
Write a program to complete the stated task:
You are offered two salary options for ten days of work. Option 1: $100 per day. Option 2: $1 the first day, $2 the second day, $4 the third day, and so on, with the amount doubling each day. Write a program to determine which option pays better.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Aug 1st, 2010, 01:21 PM
#7
Re: Vb
 Originally Posted by weirddemon
And then when they get the answer, they edit out all of their posts and ask others to do the same.
Which means:
QUOTE!!!!
Ow yeah I forgot about them doing that, yeah that's annoying and totally defeats the purpose of a public forum.
If you find a response helpful then remember to Rate it
Personal website Sam Jenkins
-
Aug 1st, 2010, 04:13 PM
#8
Re: Vb
I was the victim of one of those 
Hint 2: The second option can be calculated by adding together the powers of 2 from 0 to 9... and can be calculated in one line using LINQ.
-
Aug 1st, 2010, 07:43 PM
#9
Re: Vb
 Originally Posted by minitech
The second option can be calculated in one line using LINQ.
go on then... i've got to see that
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Aug 1st, 2010, 09:43 PM
#10
Re: Vb
I can't say it here because it would give it away, but you use an array containing the numbers from 1 to 9 and a Select 2^x statement, then an Aggregate(Function(x As Integer, y As Integer) x + y).
-
Aug 2nd, 2010, 05:10 PM
#11
Re: Vb
There's a handy feature called PM'ing
-
Aug 2nd, 2010, 05:42 PM
#12
Re: Vb
 Originally Posted by minitech
I can't say it here because it would give it away, but you use an array containing the numbers from 1 to 9 and a Select 2^x statement, then an Aggregate(Function(x As Integer, y As Integer) x + y).
 Originally Posted by formlesstree4
There's a handy feature called PM'ing 
yeah. PM me
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|