answersLogoWhite

0

Input the number as a string. If the string has a length of 4 and contains only digits, convert the string to an integer. If the integer is less than 1000, input another number. Otherwise, copy the integer and divide by 100 to get rid of the two least-significant digits. Divide again by 2 and take the remainder. If the remainder is 1 then the second left digit of the 4-digit integer is odd and the 4-digit integer can be added to the array, otherwise do not add it. Repeat for all n numbers.

User Avatar

Wiki User

7y ago

What else can I help you with?

Related Questions

How many digits does a tax exemption number have?

It will contain at least 12 digits


How many two digits number contain the digit 4?

04,14,24,34,40,41,42,43,44,45,46,47,48,49,54,64,74,84,94.... OR 19 Digits


How many significant digits does this number contain 25786999?

All of them are significant.


How many 2 digits number contain digit 4?

18.


How many three digits number contain the digit 2?

172


How many digits in a California inmate id number?

California inmate ID numbers contain six digits.


How many numbers are there in a credit card number?

Most credit cards in the United States contain 16 digits broken into four groups of four digits. American Express cards contain 15 digits, however.


When calculating the average thickness of a penny does the number of pennies in the stack influence the number of significant digits allowed?

No, counting numbers you can ignore or say they have an infinate number of significant digits. By counting numbers I mean things you count, or non measurements, or numbers you wouldn't round to significant digits anyway . Measurements always have significant digits.


How many keystrokes are needed to type numbers from 1 to 1000?

There are nine numbers which contain only one digit. There are 90 numbers which contain two digits. There are 900 numbers which contain three digits. There is one number which contains four digits.Therefore, the number of digits is equal to (9x1)+(90x2)+(900x3)+4 = 2893 digits. If this includes spaces, there would be 999 spaces, therefore there would be 3892 keystrokes.


Write a Shell program to find the sum of cube of individual digits of a number?

no thanks


How many ssn number combinations?

Interesting.Social Security numbers all have the form: (3 digits) - (2 digits) - (4 digits).That's 9 digits altogether. If you ignore the dashes, you get: xxx,xxx,xxx .With 9 places, there are 1 billion possible different numbers.


How do you make a program that counts how many times each digit occured in the integer?

To count the number of times a digit occurs in an integer, start by initializing an array of ten counts of digits, such as int digits[10];Then, in a loop while the number is non zero, increment the element in the digits array that corresponds to the units digit, and then divide the number by ten, such as digits[number%10]++ and number/=10;int digits[10];int i;int number = some number;for (i=0; i