English, asked by visakhanandan911, 1 year ago

Write a program to obtain principal amount rate of interest and time from user and compute simple interest

Answers

Answered by Anonymous
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 Jasmine9115
1

Answer:

refer to the attachment (◕ᴗ◕✿)(◕ᴗ◕✿)

Attachments:
Similar questions