How To Write A C++ Program That Computes Simple Interest

The program gets the values of Principal, Rate, Time and calculates the Simple Interest.

Moments Online
Technology Hits

--

A laptop displays lines of codes with a c++ logo to its left.
Designed by the author on Canva

This tutorial requires you to have a basic understanding of the c++ programming language.

The program gets the values of a Simple Interest from the user and calculates them.

To get started with the c++ program, we first need the formula for calculating Simple Interest.

Simple Interest is calculated as principal, multiplied by rate multiplied by time, and divide by 100.

Simple Interest = Principal * Rate * Time/100

With the formula in mind, let’s assign these values to some integer variables in natural language.

p = Principal

r = Rate

t = Time

s = Simple Interest

x = 100

s = p*r*t/x

Pseudo-code

Here is a false code of the Simple Interest program. It shows the basic concept of the program.

start

--

--

Moments Online
Technology Hits

Developer • Content Creator • Business Enthusiast - Writing to express not to impress. Taking life a day at a time.