WAP To calculate Simple Interest using pointer.

By Suraj Chaudhary

#include<stdio.h>
#include<conio.h>
void main()
{
 float p,r,t,si,*p1,*p2,*p3;
 clrscr();
 p1=&p;
 p2=&r;
 p3=&t;
 printf("Enter principal amount: ");
 scanf("%f",p1);
 printf("Enter rate of interest: ");
 scanf("%f",p2);
 printf("Enter time: ");
 scanf("%f",p3);
 si=(*p1**p2**p3)/100;
 printf("\n\nSimple Interest = %f",si);
 getch();
}

Suraj Chaudhary is a writer, developer, founder, and a constant learner. He shares lessons and resource to living a fuller life every week. On this blog, he shares helpful guides and helpful articles that help his 70,000+ monthly readers find answers, solve problems, and meet their curious needs.

Leave a Comment

Slide to prove you're not a bot/spammer *