Wednesday
September 2, 2015

Homework Help: computer science /use java language

Posted by Mira on Thursday, October 30, 2008 at 3:28pm.

write the program that inputs a string representing a binary number(0s and 1s). First, your program should veerify that it is indeed a binary number, that is, the number contains only 0s and 1s . if that is not the case, your program should print a message that number is not a valid binary number.then your program should count how many 1s are in that string and output the count. if the string does not represent a valid binary number, the program should keep prompting the user for a new string until a string representing a valid binary number is input by the user.

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

More Related Questions

Members