How to calculate simple interest in C

1 Answer

0 votes
#include <stdio.h>

int main()
{
    float PrincipalAmount = 30000, Rate = 4, Years = 3;

    float SimpleInterest = (PrincipalAmount * Rate * Years) / 100;

    printf("Simple Interest is : %.2f", SimpleInterest);

    return 0;
}




/*
run:

Simple Interest is : 3600.00

*/



 



answered Nov 14, 2022 by avibootz

Related questions

1 answer 136 views
136 views asked Nov 15, 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 147 views
147 views asked Nov 15, 2022 by avibootz
2 answers 169 views
...