WAP To calculate Simple Interest using pointer.

By Ashesh Neupane

#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();
}

Ashesh Neupane is a learner, researcher, blogger, and a social activist. He has been using his knowledge of society, contemporary events, and researching ability to help people learn things and solve day-to-day problems.

Leave a Comment

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