Write C++ Program tofind out the Simple interest .
Answers
Answer:
wo is wo pe to
Explanation:
sipahi is dghfrtgde5t fghvrtvcdfvf vgygdrfccf fg
Answer:#include <iostream>
#include <cmath>
int main() {
float principal, rate, time, interest;
std::cout << "Enter the principal amount: ";
std::cin >> principal;
std::cout << "Enter the rate of interest: ";
std::cin >> rate;
std::cout << "Enter the time (in years): ";
std::cin >> time;
interest = (principal * rate * time) / 100;
std::cout << "The simple interest is: " << interest << std::endl;
return 0;
}
Explanation:In this program, we declare four float variables principal, rate, time, and interest. The cin statement is used to read the values of principal, rate, and time. The simple interest is calculated using the formula interest = (principal * rate * time) / 100. The result is displayed on the screen using the cout statement.