Computer Hope

Software => Computer programming => Topic started by: dr_iton on December 26, 2011, 11:32:14 AM

Title: Help needed in C# - programming
Post by: dr_iton on December 26, 2011, 11:32:14 AM
Please I'm a beginer in C#, so if you just can give me a suggestion about how to solve the following problem.

Vehicle manufacturers always offer new saving fuel cars to new drivers. The Renault manufacturer has taken this in consideration and offered new car Renault Clio to a driver Syle LeSylani for one year use. Syle has kept evidence of past kilometers at every fuel filling. He made at least 5 reservoirs filling per year.
 
My duty is to write the C# program that it will accept fuel data (type: double) and past kilometers (type: double) for every fuel filling. The program it needs to process those data in console application, how many kilometers are past in each filling. Also it needs to show overall calculation of past kilometers for all fillings. The calculation must be presented in decimal (real numbers). The class and the program should be in two separate files. 


I have to wirte the pseudocode of this to.

In advance thank you for your reply.
Cheers.
Title: Re: Help needed in C# - programming
Post by: Rob Pomeroy on December 27, 2011, 08:23:20 AM
Pseudocode is not C#.  You're being asked to express this in simple statements.  It's homework by the looks of it, so your best advantage would come from having a go and then asking for comments.  There are plenty of examples of pseudocode (http://duckduckgo.com/?q=examples+of+pseudocode) on the internet which will give you a better idea of what you're trying to achieve.  Hint: it's simpler than it sounds.

The idea is that once you've written the pseudocode, converting that to C# (or any other language) is a breeze.
Title: Re: Help needed in C# - programming
Post by: dr_iton on December 27, 2011, 11:03:59 AM
@ Rob Pomeroy
I know that pseudocode isn't in C# but I just explained what I have to do.
About the program, I almost done it, but just asked for the help. It is a little to difficoult to me because I just started learning C#. I know that in the begining fuel and km's must be 0 because it is a new car. At least 5 fuel fillings per year mut be done.
The problem is that I'm stucked in a place where where it is asked to show how many km/one liter.
I get some errors and just fixing them.

Cheers.
Title: Re: Help needed in C# - programming
Post by: BC_Programmer on December 27, 2011, 01:45:43 PM
Where is what you have so far?
Title: Re: Help needed in C# - programming
Post by: Rob Pomeroy on December 28, 2011, 07:05:33 AM
The problem is that I'm stucked in a place where where it is asked to show how many km/one liter.

Is the problem to do with getting the formula correct, or something else?
Title: Re: Help needed in C# - programming
Post by: dr_iton on January 19, 2012, 03:15:54 PM
I had a problem on writing the codes, so after a time I solved (learned) it.
Anyway cheers for your help.