Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <stdio.h>
- int main(int argc, char const *argv[]) {
- double value = .12345678901;
- int accuracy = 1000; // 3 digit after dot
- printf(".%d\n", (int)(value * accuracy) );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement