Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- int main()
- {
- int p,t,r,a;
- clrscr();
- printf("Enter Prinicpal Amount:\t");
- scanf("%d", &p);
- printf("Enter Time (in Years):\t");
- scanf("%d", &t);
- printf("Enter Rate of Interest:\t");
- scanf("%d", &r);
- a = interest(p,t,r);
- printf("Simple Interest = %d\n", a);
- getch();
- }
- int interest(int p, int t, int r)
- {
- int si;
- si=(p* t * r)/100;
- return(si);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement