Thread: a string problem..i need help

  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    1

    a string problem..i need help

    hey..i need help for that question..this is my homework and i have to submit it until sunday night..this is an emergency..please look at that..

    Question 1 (25 pts.)
    Write a basic calculator which interprets the given strings and calculates the results. Your calculator must support four arithmetic operations (‘+’, ‘-’, ‘*’, ‘/’) and assignment operator (‘=’). User can use variables. For example:
    Enter the command: a = 6.4
    a = 6.4000
    Enter the command: b = 3.5
    b = 3.5000
    Enter the command: a + b
    ans = 9.9000
    Enter the command: width = ans * 3.5
    width = 34.6500
    Enter the command: quit
    Ok. Bye.
    Hint: You may define a struct to hold the variables which contains variable names and values.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Please have a look at the homework policy first.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User jephthah's Avatar
    Join Date
    May 2010
    Location
    seattle
    Posts
    49
    Poor planning on your part does not constitute an emergency on ours.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 04-25-2008, 02:45 PM
  2. String issues
    By The_professor in forum C++ Programming
    Replies: 7
    Last Post: 06-12-2007, 09:11 AM
  3. Custom String class gives problem with another prog.
    By I BLcK I in forum C++ Programming
    Replies: 1
    Last Post: 12-18-2006, 03:40 AM
  4. Compile Error that i dont understand
    By bobthebullet990 in forum C++ Programming
    Replies: 5
    Last Post: 05-05-2006, 09:19 AM
  5. Replies: 4
    Last Post: 03-03-2006, 02:11 AM