Wednesday, 12 December 2018

Practice Functions #8 [Simple Tax Calculator]

===========================================================================
                                CODING



#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<process.h>
#include<stdlib.h>
#include<dos.h>

void Tax(float P,float R,float T,float &TAX)
{
    TAX=P*R*T/100;
}

void main()
{
    clrscr();
    float P,R,T,TAX;
    cout<<"-¯ Enter Principal Amount: ";
    cin>>P;
    cout<<"\n-¯ Enter Rate of Interest: ";
    cin>>R;
    cout<<"\n-¯ Enter Time Period: ";
    cin>>T;
    Tax(P,R,T,TAX);
    cout<<"\n\n    = The Tax is: "<<TAX;
    getch();
}




===========================================================================

                                OUTPUT


No comments:

Post a Comment