Computer Science, asked by Ronald11, 1 year ago

WAP in GUI to PRINT THE SIMPLE INTEREST.

Answers

Answered by anuj
2
Heya friend,
i m just able to send the snippet of the MAIN PROGRAM

its just a normal ARITHMETIC PROBLEM in java

u have to take input from various text fields and STORE and 
WRITE PROGRAM FOR SIMPLE INTEREST



private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
    {                                            
       // TODO add your handling code here:   
    double p,r,t,s,a;         
           p=Double.parseDouble(jTextField1.getText());                                                                r=Double.parseDouble(jTextField2.getText());                                                                  t=Double.parseDouble(jTextField3.getText());       
        s=(p*t*r) /100;         
         a=p+s;       
       jLabel7.setText(""+s);     
          jLabel8.setText(""+a);
}
Answered by Anonymous
8
ANSWER

....................



/** *




C program to calculate simple interest








 */ #include


<stdio.h>
                 




        int main()



{



                                      float principle, time, rate, SI;


                         /* Input principle, rate and time */


printf 



("Enter principle (amount):

 "); scanf


("%f", &principle);


printf


("Enter time: ");


scanf("%f", &time);


printf("Enter rate: ")


; scanf("%f", &rate); /*

 Calculate simple interest */


     SI = (principle * time * rate) / 100; /*



 Print the resultant value of SI */




printf


("Simple Interest = %f", SI); return 0;





}


Similar questions