Friday
March 27, 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

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 ...
java. please help . - Write a program that reads a five digit integer number ...
Programming in c++ - Write a program in c++ that inputs a number [1-12] from the...
java - Write a program that reads a five digit integer number from the keyboard...
Python programming Language - Assume S is a string of lower case characters. ...
java programming - Your boss at Ruritania Weather Center (RWC) has asked you to ...
programming - Having troube with java, i am not a regular programmer, if anybody...
Java Programming - Hi, I have the following assignment: "Write a Java ...
Computers (Java) - Hello -- Looking for help with an extra credit assignment to ...

Members