Wednesday
June 19, 2013

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.

No one has answered this question yet.

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 ...
computer science - write a program to select the classes that you are taking(Ex...
programming - Having troube with java, i am not a regular programmer, if anybody...
Programming in c++ - Write a program in c++ that inputs a number [1-12] from the...
C Programming - Write a program that prompts the user to enter a temperature, ...
computer science - How would you write this program? We are using Java in ...
Programming - (i) What is binary tree (ii) Write a program to multiply any two ...
Computers (Java) - Hello -- Looking for help with an extra credit assignment to ...
Computers (Java) - Hello -- Looking for help with an extra credit assignment to ...

For Further Reading

Search
Members
Community