Initial commit: C language learning code
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int x;
|
||||
int n=0;
|
||||
|
||||
scanf("%d", &x);
|
||||
|
||||
n++;
|
||||
x=x/10;
|
||||
while(x>10)
|
||||
{
|
||||
n++;
|
||||
x=x/10;
|
||||
}
|
||||
printf("%d\n",n);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user