Write a program to obtain principal amount rate of interest and time from user and compute simple interest
Answers
Answered by
4
Explanation:
#a phyton program
a=int(input("enter the amount"))
p=int(input("enter the principal"))
r=int(input("enter the rate of interest"))
t=int(input("enter the time"))
print("simple interest=",(a-p))
# a Java program
import java.util.*;
class Si
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in());
int a,p,r,t;
print(" enter amount\nprincipal\nrate of interest\ntime");
a=sc.nextInt();
p=sc.nextInt();
r=sc.nextInt();
t=sc.nextInt();
System.out.println("simple interest="+(a-p));
}
}
#a c++ and c program
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,p,r,t;
count<<"enter amount\nprincipal\nrate of interest\ntime"<<;
cin>>a>>p>>r>>t>>;
count<<"simple interest="<<(a-p)<<;
getch();
}
thank you
Answered by
1
Answer:
refer to the attachment (◕ᴗ◕✿)(◕ᴗ◕✿)
Attachments:
Similar questions
English,
6 months ago
Geography,
6 months ago
India Languages,
6 months ago
Math,
1 year ago
English,
1 year ago
Computer Science,
1 year ago
Social Sciences,
1 year ago