Monday, April 30, 2018

How to convert Decimal to Binary using Array Number System Part 3

#include<stdio.h>
main()
{
    int n,i=0,j,base=2;
    int bin[100];
    scanf("%d",&n);
    while(n!=0)
    {
        bin[i++]=n%base;
        n=n/base;
    }
    for(j=i-1;j>=0;j--){
        printf("%d",bin[j]);
    }
}

Sunday, April 29, 2018

How to convert Decimal to Binary_Most_Basic_(Number_System_Part_1)

#include<stdio.h>
main()
{
    int n,rem,bin=0,k=1;
    printf("Enter a decimal number ");
    scanf("%d",&n);
    while(n!=0)
    {
        rem=n%2;
        bin=bin+rem*k;
        k=k*10;
        n=n/2;

    }
    printf("Binary = %d\n",bin);

}

Monday, February 19, 2018

Java Swing Radio Button video tutorial in netbeans by Abdullah Bin Ubaidullah

Java Swing Radio Button example:


Output:
Code
here is output


Source code:

 private void showRadioBtnExampleActionPerformed(java.awt.event.ActionEvent evt) {                                                    
        maleRadioBtn.setActionCommand("Male");
        feMaleRadioBtn.setActionCommand("Female");
        JOptionPane.showMessageDialog(null,"You have selected "+buttonGroupGender.getSelection().getActionCommand());
        
    }

Watch Video Here: