Plz solve it
-
Count the digits of a given number c programming
-
Count the digits of a given number c programming
-
Count the digits of a given number c programming
That's not how it works around here. We're not here to do your work for you. We'll help you with your code if you got specific questions or problems, but that's it.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
Count the digits of a given number c programming
Quote:
Count the digits of a given number c programming
You don't specify what kind of number it is (floating point, integer), nor how it is provided. Is the number coming in as a string, for example from ``argv`` passed to ``main``? Is the number passed in to a function as a parameter? Does the function need a particular name? Is the number allowed to be negative? Is there a maximum value for the number? Will there be decimal points? Is the number base 10, or base 2, or base 16, or is there a prefix at the front that specifies the radix? What should the result be if no number is given, or an invalid number is given? Are there any unit test cases that would provide a good example of how this is supposed to work?
-
Count the digits of a given number c programming
SARKER MD KAWSER ALOM wrote:
Count the digits of a given number c programming
First try to count the digits of a given number without c programming. Only with a peace of paper and a pencil!
-
Count the digits of a given number c programming
#include #include int main() {
int number = 1234567;
int digits = log10(number)+1;
printf("%d has %d digits\n",number,digits);
}