Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 9 Online
OpenStudy (anonymous):

Write a program that tests integers to see if they are special. A special integer is one in which all of the digits have the same value. The program should allow testing as many values as the user wishes. You should use the % operator (called “mod”) which, if both operands are non-negative integers, gives the remainder of an integer division. Thus, for example, 1357%10 is 7 (the rightmost digit of the number). Also note that the / operator, if both operands are non-negative integers, will give all digits except the rightmost digit: 1357/10 is 135. You can use these two operators and a loo

OpenStudy (anonymous):

can someone help me do this its for an intro class, its in C ++

OpenStudy (anonymous):

http://pastebin.com/bmA0qBfW

OpenStudy (anonymous):

i cant use a list

OpenStudy (anonymous):

Think about it this way: Input: An integer (base 10) called num Output: A boolean value. Local variables: integer bin, integer i. i := 0 bin = num%10 Loop: While num != 0 do: i = num%10 if i != bin then return false num = num/10 End Loop Return true In C code, one way to code it would be: http://codepad.org/a4Jwx6h7

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!