Twitter Feed Facebook Google Plus Youtube

Adsense responsive

Recent Post below header

Saturday 16 March 2013

JAVA PROGRAM: TO CALCULATE SIMPLE INTEREST USING FUNCTION

This is an example of function with parameters but without return value in java programming.



CODING OF SIMPLE INTEREST BUTTON(jButton1)
        float p,r,t,si;
        p=Float.parseFloat(jTextField1.getText());
        r=Float.parseFloat(jTextField2.getText());
        t=Float.parseFloat(jTextField3.getText());
        si(p,r,t);


CODING OF FUNCTION si()
        void si(float a,float b,float c)
        {
             float s=(a*b*c)/100;
             jTextField4.setText(" "+s);
        }


CODING OF CLEAR BUTTON(jButton2)
        jTextField1.setText(" ");
        jTextField2.setText(" ");
        jTextField3.setText(" ");
        jTextField4.setText(" ");


CODING OF EXIT BUTTON(jButton3)
        System.exit(0);


CODING

RUNNING

We have used NetBeans IDE 7.3. To download it visit www.netbeans.org

For any query or suggestion please comment below...

JAVA PROGRAM: TO CALCULATE FACTORIAL OF A NUMBER


CODING OF FACTORIAL BUTTON(jButton1)
        int num,i,fac = 1;
        num=Integer.parseInt(jTextField1.getText());
        for(i=num;i>0;i--)
        {
         fac=fac*i;
        }
        jTextField2.setText(" "+fac);

CODING OF CLEAR BUTTON(jButton2)
        jTextField1.setText(" ");
        jTextField2.setText(" ");
   

CODING OF EXIT BUTTON(jButton3)   
        System.exit(0);



CODING

RUNNING

We have used NetBeans IDE 7.3. To download it visit www.netbeans.org

For any query or suggestion please comment below...


HD TIGER WALLPAPER




 NOTE: Click on image to view it correctly.

 

HD CAT WALLPAPER




NOTE: Click on image to view it correctly.


Thursday 14 March 2013

C PROGRAM: TO CALCULATE SUM OF SERIES 1+2+3+--------UPTO N TERMS

CODING:
#include<stdio.h>
#include<conio.h>
void main()
{
 int i,n,sum=0;
 clrscr();
 printf("sum of series upto: ");
 scanf("%d",&n);
 for(i=1;i<=n;i++)
 {
  sum=sum+i;
 }
 printf("Sum of series= %d",sum);
 getch();
}


CODING
OUTPUT



For any query or suggestion please comment below...

C PROGRAM: TO FIND SUM OF SERIES 1+2+3+------+10

CODING:
#include<stdio.h>
#include<conio.h>
void main()
{
 int i,sum=0;
 clrscr();
 for(i=1;i<=10;i++)
 {
  sum=sum+i;
 }
 printf("Sum of series= %d",sum);
 getch();
}


CODING

OUTPUT


For any query or suggestion please comment below...

Sunday 10 March 2013

HD FISH WALLPAPER






 NOTE: Click on image to view it correctly.

JAVA PROGRAM: TO FIND SUM OF DIGITS OF A NUMBER



CODING OF ACTION BUTTON(jButton1)
        int num,temp,sum = 0;
        num=Integer.parseInt(jTextField1.getText());
            while(num>0)
            {
                temp=num%10;
                sum+=temp;
                num=num/10;
            }
            jTextField2.setText(" "+sum);


CODING OF CLEAR BUTTON(jButton2)
        jTextField1.setText(" ");
        jTextField2.setText(" ");
   

CODING OF EXIT BUTTON(jButton3)   
        System.exit(0);


CODING

RUNNING

We have used NetBeans IDE 7.2.1. To download it visit www.netbeans.org


For any query or suggestion please comment below...