PDA

View Full Version : C# Help



Tarast
November 2nd, 2011, 06:13 PM
Hi, i am stuck and really need a help with my assignment, can you guys help me build a simple program in c#

this is my task

The bookstore has 3 books costing £9.99, £0.50 and £3.45.
Add £2.50 for postage.
Give the customer a loyalty bonus by subtracting £0.30p per book.
Use variables for all values.
Provide a variable table and write the code to calculate the total cost of the books

any help would be appreciated

Tarast
November 2nd, 2011, 06:47 PM
this is what i done so far and i am really stuck

// This is a simple program that calculates the total cost of the books

// Namespace Declaration
using System;

// Program start class
class Bookstore
{
// Main begins program execution
public static void Main()
{
/*
Declaring 3 variables ( "book1" "book2" "book3" )
Assigning a data type ( "double" )
Givining initial values ( "9.99" "0.50" "3.45" )
*/

double book1 = 9.99;
double book2 = 0.50;
double book3 = 3.45;

coffeecat
November 2nd, 2011, 11:56 PM
Homework questions not allowed.

Thread closed.