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 218 views
218 views asked Nov 15, 2022 by avibootz
1 answer 148 views
1 answer 175 views
1 answer 222 views
222 views asked Oct 26, 2024 by avibootz
1 answer 233 views
233 views asked Nov 15, 2022 by avibootz
1 answer 230 views
230 views asked Nov 15, 2022 by avibootz
2 answers 278 views
...