Menu
Coddy logo textTech

13. Calculate Simple Interest

Lesson 14 of 31 in Coddy's 30 Days of Logic Building in C++ course.

challenge icon

Challenge

Easy

Write a function to calculate the simple interest.

  • Input: Principal: 1000, Rate: 5, Time: 2
  • Output: 100

Try it yourself

float calculateSimpleInterest(float principal, float rate, float time) {
    // write your code below 
    
}

All lessons in 30 Days of Logic Building in C++

Practice on your own: Online C++ compiler