Showing posts from February, 2011

Addition of time using if condition in Java

Java version of this program is given bellow :
/** * To change this template, choose Tools | Templates * and open the template in the editor. */ package statement; import java.util.Scanner; /** * * @author ACHCHUTHAN */ public class AddTime {

Convert a given decimal number to binary form

Description of program : This program takes a decimal number from console and it converts it into binary format . Input number is taken as Integer so convert it into an integer data using the while loop method. The Decimal number is divided by 2 and this reminder save in array .Print the binary number in reverse array using for loop