Saturday
April 19, 2014

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

programming 2 - Write a program that inputs a word representing a binary number...
math - the binary system is used for computer programming. a binary number ...
Programming in c++ - Write a program in c++ that inputs a number [1-12] from the...
Python programming Language - Assume S is a string of lower case characters. ...
programming - Having troube with java, i am not a regular programmer, if anybody...
computer science - write a program to select the classes that you are taking(Ex...
Programming - (i) What is binary tree (ii) Write a program to multiply any two ...
Computer Programming using python - Assume s is a string of lower case ...
Computers (Java) - Hello -- Looking for help with an extra credit assignment to ...
Computers (Java) - Hello -- Looking for help with an extra credit assignment to ...

Search
Members