write a program to calculate simple interest
Answers
Answer:
// Program in Java
import java.util.Scanner;
public class SI {
public static void main (String [] args) {
Scanner keyboard = new Scanner (System.in);
System out print("Enter p: ");
double p = keyboard.nextDouble();
System out print("Enter r: ");
double r = keyboard.nextDouble();
System out print("Enter t: ");
double t = keyboard.nextDouble();
System.out.println("SI = "+(p*r*t)/100);
}
}
# Program in Python
p= input('Enter p: ')
r = input('Enter r: ')
t = input('Enter t: ')
print ('SI = '+(p*r*t)/100)
// Program in C++
#include <iostream>
using namespace std;
int main() {
double p, r, t;
cout << "Enter p: ";
cin >> p;
cout << "Enter r: ";
cin >> r;
cout << "Enter t: ";
cin >> t;
cout << "SI = " << (p*r*t)/100;
return 0;
}
Bhai programming language ka naam diya kar