#include <stdio.h>
int main() {
float principal
, rate
, time, interest
;
// Ask for user input
printf("Enter the principal amount: ");
printf("Enter the rate of interest (in percentage): ");
printf("Enter the time period (in years): ");
// Calculate simple interest
interest
= (principal
* rate
* time) / 100;
// Output the result
printf("The simple interest is: %.2f\n", interest
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGZsb2F0IHByaW5jaXBhbCwgcmF0ZSwgdGltZSwgaW50ZXJlc3Q7CgogICAgLy8gQXNrIGZvciB1c2VyIGlucHV0CiAgICBwcmludGYoIkVudGVyIHRoZSBwcmluY2lwYWwgYW1vdW50OiAiKTsKICAgIHNjYW5mKCIlZiIsICZwcmluY2lwYWwpOwoKICAgIHByaW50ZigiRW50ZXIgdGhlIHJhdGUgb2YgaW50ZXJlc3QgKGluIHBlcmNlbnRhZ2UpOiAiKTsKICAgIHNjYW5mKCIlZiIsICZyYXRlKTsKCiAgICBwcmludGYoIkVudGVyIHRoZSB0aW1lIHBlcmlvZCAoaW4geWVhcnMpOiAiKTsKICAgIHNjYW5mKCIlZiIsICZ0aW1lKTsKCiAgICAvLyBDYWxjdWxhdGUgc2ltcGxlIGludGVyZXN0CiAgICBpbnRlcmVzdCA9IChwcmluY2lwYWwgKiByYXRlICogdGltZSkgLyAxMDA7CgogICAgLy8gT3V0cHV0IHRoZSByZXN1bHQKICAgIHByaW50ZigiVGhlIHNpbXBsZSBpbnRlcmVzdCBpczogJS4yZlxuIiwgaW50ZXJlc3QpOwoKICAgIHJldHVybiAwOwp9Cg==