How to calculate simple interest in C++

1 Answer

0 votes
#include <iostream>

int main()
{
    float PrincipalAmount = 30000, Rate = 4, Years = 3;
 
    float SimpleInterest = (PrincipalAmount * Rate * Years) / 100;
 
    std::cout << "Simple Interest is : "  << SimpleInterest;
}
 
 
 
 
/*
run:
 
Simple Interest is : 3600
 
*/

 



answered Nov 15, 2022 by avibootz

Related questions

1 answer 154 views
154 views asked Nov 14, 2022 by avibootz
1 answer 62 views
1 answer 78 views
1 answer 114 views
114 views asked Oct 26, 2024 by avibootz
1 answer 146 views
146 views asked Nov 15, 2022 by avibootz
1 answer 148 views
148 views asked Nov 15, 2022 by avibootz
2 answers 169 views
...