473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

urgent help needed

Any one please send me the C++ code for arithmatic calculator using
linked lists
Which performs addition ,subtraction,multiplication,division and
modulus(using operator overloading).
i need it badly,urgently before monday
please send it to my mail address
i shall be thankful ,
Regards

May 7 '06 #1
13 1969
Gohar wrote:
Any one please send me the C++ code for arithmatic calculator using
linked lists
Which performs addition ,subtraction,multiplication,division and
modulus(using operator overloading).
No.
i need it badly,urgently before monday
Then you should start writing it immediately.
please send it to my mail address


How about you tell us your teacher's mail address? Then someone can send it
directly to him/her.

May 7 '06 #2
Gohar wrote:
Any one please send me the C++ code for arithmatic calculator using
linked lists
Which performs addition ,subtraction,multiplication,division and
modulus(using operator overloading).
No.
i need it badly,urgently before monday
Then you should start writing it immediately.
please send it to my mail address


How about you tell us your teacher's mail address? Then someone can send it
directly to him/her.

May 7 '06 #3
I am sorry but no one will write the code to help you and send it to
your e-mail address. Rolf Magnus replied with a nice option:

How about you tell us your teacher's mail address? Then someone can
send it
directly to him/her.

I liked that.

Regards

May 7 '06 #4
Gohar wrote:
Any one please send me the C++ code for arithmatic calculator using
linked lists
Which performs addition ,subtraction,multiplication,division and
modulus(using operator overloading).
i need it badly,urgently before monday
please send it to my mail address
i shall be thankful ,
Regards


I think I have something you can start with. How much are you willing to
pay for it? I'll sell it to you for a special price: €150,- How does
that sound?

LOL :-)

I can't believe so many lazy students I see post questions about 1-2
days before they should hand in their solution to an assignment, when
they've probably had more than a week at least to try to do something
and begin working on the exercise.
Best regards / Med venlig hilsen
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
May 7 '06 #5

"Gohar" <go*********@yahoo.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Any one please send me the C++ code for arithmatic calculator using
linked lists
Which performs addition ,subtraction,multiplication,division and
modulus(using operator overloading).
i need it badly,urgently before monday
please send it to my mail address
i shall be thankful ,
Regards


Answer:
Write a program that calculates the number of times Monday happens during
any given year, including leap years. Use a linked list to store a
month-by-month breakdown of the number of times Monday occurs using integers
and percentages. Output the data using a std::ofstream to a file. Provide an
interface to read/load the dataset using a std::ifstream and compare the
dataset with a user's input year. Display the result.

May 8 '06 #6

"Gohar" <go*********@yahoo.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Any one please send me the C++ code for arithmatic calculator using
linked lists
Which performs addition ,subtraction,multiplication,division and
modulus(using operator overloading).
i need it badly,urgently before monday
please send it to my mail address
i shall be thankful ,


I have no idea what such code might look like in C++ and my Delphi version
doesn't support operator overloading. But the guts of what you ask for
might look something like the following in D5.
Type
pStackRec = ^ tStackRec;
tStackRec = record
rValue : double;
rLink : pStackRec;
end;
tCalcOp = (add, subtract, multiply, divide, modulo);

var CalcStack : pStackRec = nil;

procedure PushStack (val : double);

var p : pStackRec;

begin
New (p);
p^.rLink := CalcStack;
CalcStack := p;
p^.rValue := val;
end;

function PopStack : double;

var p : pStackRec;

begin
if CalcStack <> nil
then result := CalcStack.rValue
else raise Exception.Create ('Stack underflow');
p := CalcStack;
CalcStack := CalcStack^.rLink;
Dispose (p);
end;

function StackCalc (op : tCalcOp) : double;

var p : pStackRec;

begin
if CalcStack = nil
then raise Exception.Create ('Emtpy Stack');
p := CalcStack;
result := 0.0;
if op in [add .. modulo]
then begin // two operands required
CalcStack := CalcStack^.rLink;
if CalcStack = nil
then raise Exception.Create ('Missing operand');
case op of
add : result := CalcStack^.rValue + p^.rValue;
subtract : result := CalcStack^.rValue - p^.rValue;
multiply : result := CalcStack^.rValue * p^.rValue;
divide : result := CalcStack^.rValue / p^.rValue;
modulo : result := CalcStack^.rValue - ((CalcStack^.rValue /
p^.rValue) * p^.rValue);
end;
Dispose (p);
CalcStack^.rValue := result;
end;
end;
May 8 '06 #7
Gohar schrieb:
Any one please send me the C++ code for arithmatic calculator using
linked lists
Which performs addition ,subtraction,multiplication,division and
modulus(using operator overloading).
i need it badly,urgently before monday
please send it to my mail address
i shall be thankful ,
Regards

Hello,

first of all you should convince your teacher that the assignement is to
be done on Pascal or Delphi. You surely wanted to do this anygow didn't
y? Or why would you otherwise write to two not relevant newsgroups?

Another thing: you should tell us how much you'd pay us for a solution
(at least a fundamental one) and how much for a really working solution.

To further simplyfy the task, your should - as already mentiones - send
us the e-mail address of your teacher, then we can deliver much more
faster and are sure that nothing gets lost during transmission.

You also should show us the source you've already programmed for this
assignement.

Another question: what school are you in or what do you study?

Oh and btw: hurry up, the less the time the more the price for our
work...(yes economics is hard)

Greetings

Markus
May 10 '06 #8
Gohar wrote:
Any one please send me the C++ code for arithmatic calculator using
linked lists


So you are:
- too lazy to do your homework yourself
- too computer-illiterate to do an internet search for a solution
- too ignorant even to know the difference between C++ and Pascal.

Duuuh!
May 12 '06 #9

Dr Engelbert Buxbaum wrote:
Gohar wrote:
Any one please send me the C++ code for arithmatic calculator using
linked lists


So you are:
- too lazy to do your homework yourself
- too computer-illiterate to do an internet search for a solution
- too ignorant even to know the difference between C++ and Pascal.

Duuuh!


and you love feeding the trolls :(

May 12 '06 #10
Try the TDatetimepicker and pick a date three weeks ago.
That should give you plenty of time.
O well, too late now....

"Diego Martins" <jo********@gmail.com> schreef in bericht
news:11**********************@d71g2000cwd.googlegr oups.com...

Dr Engelbert Buxbaum wrote:
Gohar wrote:
> Any one please send me the C++ code for arithmatic calculator using
> linked lists


So you are:
- too lazy to do your homework yourself
- too computer-illiterate to do an internet search for a solution
- too ignorant even to know the difference between C++ and Pascal.

Duuuh!


and you love feeding the trolls :(

May 17 '06 #11
Bruce Roberts wrote:
"Gohar" <go*********@yahoo.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Any one please send me the C++ code for arithmatic calculator using
linked lists
Which performs addition ,subtraction,multiplication,division and
modulus(using operator overloading).
i need it badly,urgently before monday
please send it to my mail address
i shall be thankful ,

I have no idea what such code might look like in C++ and my Delphi version
doesn't support operator overloading. But the guts of what you ask for
might look something like the following in D5.
Type
pStackRec = ^ tStackRec;
tStackRec = record
rValue : double;
rLink : pStackRec;
end;
tCalcOp = (add, subtract, multiply, divide, modulo);

var CalcStack : pStackRec = nil;

procedure PushStack (val : double);

var p : pStackRec;

begin
New (p);
p^.rLink := CalcStack;
CalcStack := p;
p^.rValue := val;
end;

function PopStack : double;

var p : pStackRec;

begin
if CalcStack <> nil
then result := CalcStack.rValue
else raise Exception.Create ('Stack underflow');
p := CalcStack;
CalcStack := CalcStack^.rLink;
Dispose (p);
end;

function StackCalc (op : tCalcOp) : double;

var p : pStackRec;

begin
if CalcStack = nil
then raise Exception.Create ('Emtpy Stack');
p := CalcStack;
result := 0.0;
if op in [add .. modulo]
then begin // two operands required
CalcStack := CalcStack^.rLink;
if CalcStack = nil
then raise Exception.Create ('Missing operand');
case op of
add : result := CalcStack^.rValue + p^.rValue;
subtract : result := CalcStack^.rValue - p^.rValue;
multiply : result := CalcStack^.rValue * p^.rValue;
divide : result := CalcStack^.rValue / p^.rValue;
modulo : result := CalcStack^.rValue - ((CalcStack^.rValue /
p^.rValue) * p^.rValue);
end;
Dispose (p);
CalcStack^.rValue := result;
end;
end;

Why do this the hard way.

I showed a 10 year old kid how to do this in VB and then in Delphi.

Just put some edit boxes on the form.

and some buttons - - click a button does selected task. Cheap, Simply
and educational. The kid and friends played with it for hours - to the
mothers surprise. and the kid did the coding.

No stack or anything like that - - - but it worked and was a lesson for
the kid.

but then again this sounds like a home work assignment. - - -

Jim P
Jun 2 '06 #12

"Jim P" <Ji***@mad.scientist.com> wrote in message
news:bL******************************@comcast.com. ..
Why do this the hard way.
Because that is what was asked for.
I showed a 10 year old kid how to do this in VB and then in Delphi.

Just put some edit boxes on the form.

and some buttons - - click a button does selected task. Cheap, Simply and
educational. The kid and friends played with it for hours - to the
mothers surprise. and the kid did the coding.


Except that this solution cannot handle out of order evaluation, e.g. 5 + 6
* 7, with correct operator precedence. Glad the kids had fun learning
something new.


Jun 3 '06 #13
Bruce Roberts wrote:
"Jim P" <Ji***@mad.scientist.com> wrote in message
news:bL******************************@comcast.com. ..

Why do this the hard way.

Because that is what was asked for.

I showed a 10 year old kid how to do this in VB and then in Delphi.

Just put some edit boxes on the form.

and some buttons - - click a button does selected task. Cheap, Simply and
educational. The kid and friends played with it for hours - to the
mothers surprise. and the kid did the coding.

Except that this solution cannot handle out of order evaluation, e.g. 5 + 6
* 7, with correct operator precedence. Glad the kids had fun learning
something new.


that is why you need a globel number and operator stack with a recursive
evaluation function.
done that! been there before!

--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5

Jun 3 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: choksi | last post by:
Hello All I am running PHP5.0.2 over apache 1.3.29 and openssl-0.9.7d on a Debian Linux and with a fake (internal)ip. Php Configure command './configure' '--with-apxs=/www/bin/apxs'...
10
by: Tony Archer | last post by:
Gentlemen, your urgent help is needed in solving a STRANGE problem. I have two servers a dev box, and a production box. On the dev box everything works fine, in production it hoses: One of...
1
by: Tony Archer | last post by:
(Forgive the dupicate post, I had left out the OS Version out of the prior post.) Gentlemen, your urgent help is needed in solving a STRANGE problem. I have two servers a dev box, and a...
0
by: felix_william | last post by:
Attention=3A Dear friend=2C REQUEST FOR BUSINESS RELATIONSHIP OF GREAT PROFITS I am HON=2E =28DR=2E=29 Felix William=2C the Director of Procurement and Contract Award at the Nigerian National...
12
by: Vibhajha | last post by:
Hi friends, My sister is in great problem , she has this exam of C++ and she is stuck up with some questions, if friends like this group provides some help to her, she will be very grateful....
4
by: Random | last post by:
The way I've built my page is to take the user through a multi-form process, only rendering those controls that are needed for each section. The ViewState is working the way I want it to,...
7
by: meenasamy | last post by:
Hi all, i need to create a function that takes three parameters( Original currency, needed currency, amount) i need to convert from the original currency to the needed currency the amount and...
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
2
by: Preetam Pattanashetty | last post by:
Hi I am learning ASP.NET using C#. I am able to run .aspx files on local system, but when I load them to the server, I get the "Server Error in '/' Application" error. I have tried to configure the...
0
by: Christopher | last post by:
Urgent Help Needed: The EPVH-1.1 Visual Hull Library. Dear All, I am a student doing research in computer vision. The EPVH-1.1 Visual Hull Library will really help a lot in my research. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.