answersLogoWhite

0


Best Answer

int main()

{

int p,n,count;

float r,si;

count=1;

while(count<=3)

{

printf("\n enter values of p,n,andr");

scanf("%d %d %f",&p, &n, &r);

si=(float)p * (float)n * r / 100;

printf("simple interest =rs. %f",si);

count=count+1;

}

return(0);

}

Nishant:this will give S.I...

-----------------------------------------------------------------------------------------------------

//mycfiles.wordpress.com

//Program for Calculate Simple Interest

#include<stdio.h>

#include<conio.h>

void main()

{

float p,r,n,si;

clrscr();

printf("\nEnter the profit, rate & no of yr\n\n ");

scanf("f%f",&p,&r,&n);

si=(p*r*n)/100;

printf("\nSimple Intrest=%f",si);

getch();

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

public double calculateSimpleInterest(double principal, int years, double rate){

double interest = 0;

interest = (principal * years * rate)/100;

return interest;

}

The above method will take the principal, rate of interest and no. of years and calculates the simple interest and returns the value.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

this is an java program,only for calculating simple interest

import java.awt.*;

import java.applet.*;

import java.awt.event.*;

/*

<applet code="simin" width=300 height=50>

</applet>

*/

public class simin extends Applet implements ActionListener {

// Three text fields:

TextField principalField, rateField, numYearsField;

// Variables we will need:

double simpleInterest = 0;

double amount = 0;

double principal = 0;

double numYears = 0;

double rate = 0;

public void init()

{

// Create the textfields, labels and button.

principalField = new TextField (6);

rateField = new TextField (6);

numYearsField = new TextField (6);

Label principalLabel = new Label ("Principal ");

Label rateLabel = new Label ("Rate (%) ");

Label numYearsLabel = new Label ("Time (in years) ");

Button calcButton = new Button ("Calculate");

// Lay out the components.

add (principalLabel);

add (principalField);

add (rateLabel);

add (rateField);

add (numYearsLabel);

add (numYearsField);

add (calcButton);

// Add the applet as listener to the calc button so that

// actionPerformed (below) is called when the button is clicked.

calcButton.addActionListener (this);

}

public void actionPerformed (ActionEvent e)

{

// First, let's work with the principal. Start

// by getting the string from the textfield:

String principalString = principalField.getText ();

// Remove whitespace on either end:

principalString = principalString.trim ();

// Now extract the value and assign it to our double variable:

principal = Double.parseDouble (principalString);

// Ditto for numYears:

String numYearsString = numYearsField.getText ();

numYearsString = numYearsString.trim ();

numYears = Double.parseDouble (numYearsString);

// Let's illustrate a shortcut that may be a little hard to understand:

rate = Double.parseDouble (rateField.getText().trim());

// Calculate the simple interest:

simpleInterest = (principal * rate * numYears) / 100;

amount = principal + simpleInterest;

// Redraw

repaint();

}

public void paint (Graphics g)

{

// Display the simple interest and amount:

g.drawString ("The simple interest and amount after " + numYears + " years", 60,100);

g.drawString (" Simple Interest: " + simpleInterest, 60,120);

g.drawString (" Total amount: " + amount, 60,140);

}

}

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

#include<stdio.h>

void main()

{

int si,p,t;

float r;

printf("enter the value of p,t,r");

scanf("%d%d%f",&P,&t,&r);

si=p*t*r/100;

printf("%d",si);

return(0);

}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Hi..

well to cal simple interest.. here is the prg..

for DLL:

Public Function si(ByVal p As Double, ByVal r As Double, ByVal t As Double) As Double

si = p * t * r / 100

End Function

for FORM:

Private Sub cmdsi_Click()

dim x as double

p = Val(Text1.Text)

t = Val(Text2.Text)

r = Val(Text3.Text)

x = s1.si(p, t, r)

Text1.Text = x

End Sub

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Implement this method:

public static int computeInterest(int capital, int interestRate, int time) {

return captial * interestRate * time / 100;

}

The capital and interest rate should be multiplied by 100 before being passed in to allow for the use of integer operations. This will keep precision to a maximum. The answer passed back will also be in pennies.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

Before one can write a Java script program for simple interest calculation, you will have to familiarize yourself with the process. First you will have to determine the language you will be using, this can be either compiled or interpreted. You will then have to decide whether your program will be server side script, or server side script. You will need a web browser and a text editor. You can then begin writing your code.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

P = principal: T = time in years: R = interest rate percent

Input P , T, R

Interest = (P*T*R)/100

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

write a program in c to calculate simple interest for 5 years

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a programme to find simple interest?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you find the time for principal and rate?

If you are working on simple interest you have to write the equation I=p. r.t


How do you write a C program to find the Simple Interest?

Reference:cprogramming-bd.com/c_page1.aspx#simpleinterest


Where can I find a simple interest calculator online?

There are many simple interest calculators online that you can find. I found the one at http://easycalculation.com/simple-interest.php to be simple and accurate.


Find the formula of simple interest?

the formula for simple interest is I=PRT (interest=principal x rate x time )


How do you write c programme to find proper subset of a given string?

you can use strstr()


How do you find time in simple interest?

time(t)= interest/rate , princaple


Solve simple investment problems using the simple interest rate method?

find the interest on $4000 at 3.5% annual interest for 1 year 6 months


How does simple interest work?

Multiply together the capital, the interest rate (as a fraction) and the number of periods to find out the interest.


How do you draw an algorithm to find the simple interest?

The answer depends on what information you do have.


Where could one find an online simple interest calculator?

If you are looking for an online simple interest calculator there are several sites that you can find this on. One site where you can is called Easy Calculation and will give you all the tools you need.


The difference between the simple and compound interest on a certain sum is Rs250 for two years at 5 percent Pa per annum Find the sum?

simple interst is when you earn interest from your principal but compound interest is when you earn interest from your principal as well as from your previous interest


How do you find simple interest rate?

P*r*t divided by 100