menu
Qammunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Given a positive real number, print its fractional part.
Ask a Question
Questions
Unanswered
Tags
Ask a Question
Given a positive real number, print its fractional part.
asked
Nov 9, 2019
159k
views
1
vote
Given a positive real number, print its fractional part.
Computers & Tech
middle-school
Alexandre Passos
asked
by
Alexandre Passos
8.5k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
3
votes
The modf() function will do this for you:
double x, y, d;
x = -14.876;
y = modf(x, &d);
printf("Fractional part = %lf\\", y);
Gourav Garg
answered
Nov 13, 2019
by
Gourav Garg
8.3k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
No related questions found
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
Seven basic internal components found in a computer tower
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity.org