Write a program to convert a decimal number to binary form?
Answer / hamada zahera
String s="";
while(n > 0 ) {
if(n % 2 == 0)
s+="0";
else
s+="1";
n=n/2;
}
s.reverse();
Is This Answer Correct ? | 12 Yes | 3 No |
write a c program which takes 20 numbers in an array as input from user and rearrange them in two different array defining even or odd
does anyone know the code to display a triangle using a applet?
For printing a message we use System.out.println in normal programs. We use String msg="text....."; Can't we use String msg=" " in normal programs and System.out.println("........") in applets. Please answer this question?
how to print a message to console without using main() function?(do not use even static blocks also.)
Why we r using String args[] in main() even though v r not passing any arguments in command line?
write a program that will ask the user to enter a number n and display the product of all numbers from 1 to n.
Write a program to convert a decimal number to binary form?
Program to print map of India in java.
Design a program using one-dimensional array that determines the highest value among the eight input values from a user. Display the difference of each value from the highest to the lowest.
How can we get the details for printing the employee details at run time using JDBC connectivity? can u provide the coding for that? Its urgent?
Bubble Sort. java thereafter the user will be asked to inpout the size of the list,sort the list in ascending order and display the sorted list in a horizontal manner???
write a program that inputs two real numbers then exchanges their values.