»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 10-12-2003, 12:12 PM   #1 (permalink)
Registered User
 
couch potato's Avatar
 
Join Date: Oct 2002
Location: Salem, Oregon
Posts: 479
couch potato is on a distinguished road
Kids teaching myself C, and i got a question

mkay, i have been making several programs that do conversions, such as earth's gravity to moon's gravity, and dollars to pounds, but i have a question. maybe its just that im not too advanced into math (taking algebra 2), but is there a way to get it to output specific amounts, such as $5.75 instead of just $5.00? i tried using integers and floating and double, but they dont seem to work, or i just doing something wrong?

__________________
"The filthy rich don't seem so filthy when you become one of them"
couch potato is offline   Reply With Quote
Old 12-01-2003, 05:43 AM   #2 (permalink)
Registered User
 
voogru's Avatar
 
Join Date: Oct 2001
Location: Miami FL.
Posts: 1,795
voogru is on a distinguished road
Send a message via ICQ to voogru Send a message via AIM to voogru
Re: teaching myself C, and i got a question

Quote:
Originally posted by couch potato
mkay, i have been making several programs that do conversions, such as earth's gravity to moon's gravity, and dollars to pounds, but i have a question. maybe its just that im not too advanced into math (taking algebra 2), but is there a way to get it to output specific amounts, such as $5.75 instead of just $5.00? i tried using integers and floating and double, but they dont seem to work, or i just doing something wrong?

float flValue = 1.337;
printf("Your floating point value is %f\n", flValue);
__________________
-voogru
It wasnt me!
http://www.voogru.com
voogru is offline   Reply With Quote
Old 12-01-2003, 06:54 AM   #3 (permalink)
ResellerRatings Moderator
 
Join Date: Oct 2001
Location: Winter Park Florida
Posts: 2,591
phenious is on a distinguished road
Send a message via AIM to phenious
if what voogru said dosnt help post some code snippits so we can see what your doing

-: phenious :-
phenious is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

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