#include <stdio.h> int main(void) { int count,number; count=0; printf("Enter a number:"); scanf_s("%d",&number); if(number<0)number=-number; do{ number=number/10; count++; }while(number!=0); printf("It contains %digits.\n",count); return 0; }
haha1235 |
|
||
Copyright © 2024 haha1235
Powered by .NET 9.0 on Kubernetes |