C programing–
a. -write a function show_interest() to take in 3 argumentsprincipal, rate and periods.
– interest = principal * rate * periods
– return the interest to the calling function
b. write the main() function to call show_interest .
– print the following string The simple interest will be$1,000.00
Solution
#include <stdio.h>double show_interest(double principal, double rate, double periods){ double interest = principal * rate * periods; return interest;}int main(){ double principal; double rate; double periods; printf(“Enter principle: “); scanf(“%lf”,&principal); printf(“Enter rate: “);
OR
OR