Thread: Using mathematical symbols

  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,663
    cout<<'$'<<total1<<endl;

    Other challenges lay ahead.
    Last edited by 7stud; 02-27-2006 at 08: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, 06:43 PM
  2. Replies: 7
    Last Post: 02-02-2009, 07: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, 03:01 PM
  5. symbols, no symbols, symbols ...
    By pavmarc in forum Linux Programming
    Replies: 0
    Last Post: 08-23-2005, 12:36 PM