Object: - Write a program and algorithm to find the Value of Si (Simple Interest) .
Program:-# include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int p,n,r;
float si;
printf("Enter the Value of p,n,r");
scanf("%d%d%d",&p,&n,&r);
si=(p*n*r/100);
printf("Value of Si");
printf("%f",si);
getch();
}
Algorithm:-
Step (1):- Start
Step (2):- int n, p, r
Step (3):- float si
Step (4):- Enter the value of n, p, r
Step (5):- Value of n, p, r
Step (6):- si ← (p*n*r/100)
Step (7):- Disply si
Step (8):- Stop
---------------------------------------------------------------------------------------
Output:-
Enter the Value of p,n,r 500
2
5
Value of Si 50.000000
0 Comments:
Post a Comment