answersLogoWhite

0

The tricky part is getting the individual digits. There are basically two ways to do this: 1) Convert the number to a string, and use string manipulation to get the individual digits. 2) Repeatedly divide the number by 10. The digit is the remainder (use the "%" operator).

To actually get the highest digit, initially assume that the highest digit is zero (store this to a variable, called "maxDigit" or something similar). If you find a higher digit, replace maxDigit by that.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

What is the code of a c program that will read in a positive integer value and determine If the integer is a prime number and If the integer is a Fibonacci number?

see the program


Write a program to subtract integer y from integer x?

x -=y;


Is -5 a integer?

1 hour ago my c program said no, but now I know 5 actually is an integer!


What mathematical program can solve the highest number puzzle?

Any program whose output is: " Don't waste your time! There is no highest number. Never was, never will be."


Local guidance for the Installation Security Program is derived from?

afi 31-101


Wrie a program to receive an integer and find its octal equivalant?

Use %o


What is the highest rated TV show in 2015?

Not counting sports programming, for the 2014-2015 fall season, Empire was the highest ranked program for the 18/49 demo & The Big Bang Theory was the highest viewed program.


How would you write a program that read an integer for display each of digit of integer in English?

Use an enum if you are using a c style language. Or a map data structure. Assign each integer an English value and then match it to what the user inputs.


How do you Write a C program to reverse an Integer number.?

Reference:cprogramming-bd.com/c_page2.aspx# reverse number


What lists all the integer solutions of the equation x equals 10?

The person or program that solves the equation does.


How do you make a program to check the remainder in gw-basic?

Use the MOD operator to get the remainder of integer division.


What is the highest level of VPP recognition?

A VPP Star is the highest level of recognition in the OSHA Voluntary Protection Program