GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 20-Sep-2006, 15:51
albert_123 albert_123 is offline
New Member
 
Join Date: Sep 2006
Posts: 5
albert_123 is an unknown quantity at this point
Post

Try to post the code of this program plzzz..Calculator is hard to solve!!!


Write a program to model a simple calculator. Each data line should consist of the next operation to be performed from the list below and the right operand. Assume the left operand is the accumulator value(initial value of 0). You need a function scan_data with two output parameters that returns the operator and right opernad scanned from a data line. You need a function do_nest_op that performs the required operation.do_next_op has two input parameters (the operator and operand) and one input/output parameter (the accmulator). The valid operators are:

+ add
- subtract
* multiply
/ divide
^ power(raise left opernad to power of right operand)
q quit

Your calculator should display the accumulator value after each operation. A sample run follows.

+ 5.0
result so far is 5.0
^ 2
result so far is 25.0
/ 2.0
result so far is 12.5
q 0
final result is 12.5
  #2  
Old 20-Sep-2006, 16:38
WaltP's Avatar
WaltP WaltP is online now
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,281
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: Try to post the code of this program plzzz..Calculator is hard to solve!!!


So you want us to write it for you, correct?
__________________

Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough.
-- Pearl Williams
  #3  
Old 20-Sep-2006, 22:54
albert_123 albert_123 is offline
New Member
 
Join Date: Sep 2006
Posts: 5
albert_123 is an unknown quantity at this point

Re: Try to post the code of this program plzzz..Calculator is hard to solve!!!


try if your code is also the same to my code also!!!!so post it plzzzzz
  #4  
Old 21-Sep-2006, 03:41
WaltP's Avatar
WaltP WaltP is online now
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,281
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: Try to post the code of this program plzzz..Calculator is hard to solve!!!


Quote:
Originally Posted by albert_123
try if your code is also the same to my code also!!!!so post it plzzzzz
What?? How would I know if my code is like your code? I haven't seen your code yet.
__________________

Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough.
-- Pearl Williams
 
 

Recent GIDBlogToyota - 2008 November Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Guidelines for posting requests for help - UPDATED! WaltP C Programming Language 1 11-Nov-2007 22:05
Can you help me solving this program!plzz post the code of this program plzz.. albert_123 C Programming Language 2 12-Sep-2006 07:47
How to sort random access file? wmmccoy0910 C Programming Language 12 04-Sep-2006 04:40
Compiling/Linking roostercogburn C Programming Language 5 08-Nov-2005 15:32
Guidelines for posting requests for help - UPDATED! WaltP C++ Forum 0 21-Apr-2005 03:44

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:03.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.