VS 2008 - Help with code to work out a total cost with diferent prices per mile

Associate
Joined
2 Oct 2008
Posts
1
Hi guys,

Im 100% new to programming and wondering if someone could help please.

For our programming assignment to end the module (which im really struggling with) we have to write some code for use in a fictional taxi firm that charges £2 for the first mile, one price for miles 2-10, and another for all miles thereafter.

I can handle the pseudo code in structured english, but I have NO idea how to do the actual code. :(

My levels of coding knowlege are zero, more of a networking and hardware guy.

Im not asking anyone to write it for me, just point me down the path so I can try it myself an learn.

Thankyou for any and all help given :)
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,324
Location
Derbyshire
Post up your pseudocode as it might help you. A simple way of looking at it might be:

If the total distance is less than or equal to 1 mile then charge £2.
Else if the total distance is between 1 and 10 miles then charge £x
Else if the total distance is greater than 10 miles then charge £y

That's almost a compilable example :p.
 
Soldato
Joined
3 Jun 2005
Posts
3,065
Location
The South
As PaulStat, VS is just an IDE but have a look on Microsoft's MSDN website, plenty of information regarding .NET languages (assuming it'll be .NET).
As for a few coding pointers, all you'll need to learn (for this anyways) is IF Statements, String/Integer variables, basic Maths functions and anything GUI related (although you could design it for console which is pretty straight forward and easy).
 
Back
Top Bottom