hey all

we dont have halloween 'officially' here in australia, yet stores sell costumes and plastic pumpkin baskets, and promote sweets. Also we dont usually have 99% of kids running around the neighbourhood, if you going to let the kids go trick or treating, its best to have adult supervision, there is always some weirdo around. Last year, i think only one kid came to my house, this year, none.
Its the same with valentines day, so much commercialism here for a holiday that has got nothing to do with us down under!
I wouldn't be surprised it we adopt thanksgiving next.
I will admit that I like christmas for these reasons:

[LIST]
[]all that xmas music and decorations lift up my spirits and put me in a cheery mood.
[
]spending time with family (isnt that what it should be about?)
[]shopping!!!!!(what woman doesn't like that? and xmas is a good excuse to go shopping)
[
]seeing the joy on my kids faces when they open their presents to reveal something that they always wanted.
[*]xmas is known as the 'silly season', so it is a good excuse to be silly, like singing to the xmas carols playing overhead in the supermarket while i shop - out loud.
[/LIST]
All these holidays (including easter), have become so commercialised that we forget what they really are. But maybe that's ok, because if we wanted to actually celebrate a pagan ritual, would that mean we would need a blood sacrifice?

cheers
nm:-/

well ...

sneekula commented: Hello, nice to have you post here +6

Hey all!
Here is a challenge problem to try. Its actually one of the questions on my last assignment which I have already completed and handed in.

Write a program that involves two classes and simulates the operation of a petrol (gas) pump.
A customer will arrive at a random time after the start of the simulation, and will purchase a random amount of petrol.
There is only one petrol pump, which has an underground tank that stores the petrol for sale. The capacity of the underground tank is 500 litres
Declare c++ classes for the Pump (with tank included) and the Customer, which is outlined further down.
Before the next customer purchases petrol, the program must display the amount of petrol remaining in the tank, and the price per litre for the petrol.
If the amount of petrol in the supply tank is greater than the amount the customer requests to purchase, the purchase request should be completed, otherwise only the amount of petrol in the supply tank should be sold.
After the petrol requested is provided, the details of the purchase should be displayed:
this will include:
number of litres provided
total cost of petrol provided

When the simulation finishes, the program should display:
the number of customers that purchase petrol
the total amount of money from the petrol sales

  1. Write the declaration for the Customer class.
  2. Define the class fully, so that it can be used as part of your code solution to this question. ...
bonnie1702 26 Newbie Poster

Hi there!
I am just starting out in c++ and so far, its going ok. I have a small problem in a simple program that is frustrating me, so I am hoping someone will point me in the right direction of where I've gone wrong.
The program basically prompts the user to input two integer values, then outputs all the odd numbers between these two integer values (and their squares), and also outputs all the even numbers between the two inputted values, along with the sum of these even numbers.
I have the program working sufficiently, so long as the first value entered by the user is smaller than the second value entered. Thats the small problem I've encountered; it should not make a difference between the size of the values entered. I think i need to change the condition in the for loop, but I've tried various conditions without success
Here is the program:

[ICODE]

include
include
include

using namespace std;

int main()
{
int a,b,a1,b2,square; //declaring variables
int sum = 0;
cout << "Enter two integers: " << endl; //user inputs two integers
cin >> a >> b;
cout << "The numbers entered are: " << endl; //displays the integers listed
cout << "1. " << a << endl;
cout << "2. " << b << endl;
a1 = a;
b2 = b;
//for odd numbers
cout << "The odd numbers between " << a << " and " << b <<
", along with ...

Salem commented: Congratulations on being able to use code tags on your first post. Keep up the good work. +20