Using mathematical symbols

This is a discussion on Using mathematical symbols within the C++ Programming forums, part of the General Programming Boards category; I am writing a mail order house program that has five products, at 5 different prices and I need to ...

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    14

    Using mathematical symbols

    I am writing a mail order house program that has five products, at 5 different prices and I need to be able to input the product number and the quantity sold in one day. I have the program done to the point of being able to enter the information needed but now I need to be able to get it to output the totals with a dollar sign in front of it ($2.98). I am drawing a blank at this point. Guess I have worked on it for to many hours today.

    Any help as to how to code the dollar sign would be appreciated.

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    cout<<'$'<<total1<<endl;

    Other challenges lay ahead.
    Last edited by 7stud; 02-27-2006 at 07:45 PM.

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    14
    Thank you 7stud. I can see that it is time for me to put this away for today.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linux Putting my children to sleep with futex!?
    By Abs in forum Linux Programming
    Replies: 18
    Last Post: 02-12-2009, 05:43 PM
  2. Replies: 7
    Last Post: 02-02-2009, 06:27 AM
  3. Trouble with Windows/DirectX programming
    By bobbelPoP in forum Windows Programming
    Replies: 16
    Last Post: 07-08-2008, 02:27 AM
  4. Strange error?
    By MrLucky in forum C++ Programming
    Replies: 5
    Last Post: 02-04-2006, 02:01 PM
  5. symbols, no symbols, symbols ...
    By pavmarc in forum Linux Programming
    Replies: 0
    Last Post: 08-23-2005, 12:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21