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
How to create and run runnable jar file of a Java Project.
4 Answers HCL, TCS, Tech Mahindra, US Consulate, Wipro,
Is it possible to define marker interface in java.If possible then how to define user defined marker interface?
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???
Can we run Applet in Web browser with security policy files
inner join,outerjoin,trigger,stored procedure explain with code snippets?
write a program in java to solve a system of n-variabled simultaneous equations using the guassian elimination method. let the maximum possible value of n be 100. run the program using hypothetical values for a set of 10- variables simultaneous equations. print out the program, the input equation and the results generated by the program.
write a java program to create a Frame with three scrolls, change the back ground color of the frame using functions with values of scrolls.
write a program that inputs two real numbers then exchanges their values.
Why the program getting error if we don't use String args[] in main(), even in the case of not getting any arguments from command line?
How to create Date method to set the date in Ms Access
Write a java program to display multiplication table in a Frame.