Created
August 24, 2012 03:48
-
-
Save christianroman/3445232 to your computer and use it in GitHub Desktop.
Floating Point digits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: main.cpp | |
* Author: christian | |
* | |
* Created on 21 de noviembre de 2011, 14:00 | |
*/ | |
#include <cstdlib> | |
#include <math.h> | |
#include <stdio.h> | |
int main(int argc, char** argv) { | |
int a; | |
scanf("%d",&a); | |
printf("Cifras: %d",(int)floor(log10(abs(a)))+1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment