Back To C++ User Defined Functions Index
//program to create a function that inputs price and rate of discount from the user and calculates discount amount #include
#include
void calcdiscount(float,float); void calcdiscount(float price,float discount) { float disprice; disprice=price*(discount/100); cout<<"discount amount is "<
>p; cout<<"enter discount as percentage"; cin>>d; calcdiscount(p,d); getch(); }