Question
For a visa application to United States (US), the US Government charges a fee of RM5000 for a student visa, RM7000 for a working visa
For a visa application to United States (US), the US Government charges a fee of RM5000 for a student visa, RM7000 for a working visa and RM1000 for a tourist visa. For each application, a processing fee of RM200 is imposed. Program 2 is to calculate the fee that has to pay by an individual for US visa application. CALCULATE_ PAYMENT function will calculate the total amount payment and the result will be return to Main function for printing. Study program 1 to answer questions a, b, c and d.
#include
using namespace std;
int main()
{
int payment;
char name[20],visa_type;
(a) // Function Prototype
// Input section
cout<<"Please enter your name";
cin>>name;
cout<<"Please enter type of Visa S-Student/T-Tourist/W-Working";
cin>>visa_type;
// Process section
payment= (b) ; // Function Calling
// Output section
cout<<"The total amount is RM"< return 0; }// End Function Main int CALCULATE_PAYMENT( char type) { (c) } Program 1 Write the prototype function for Program 2. Write the function call for Program 2. Complete section c by writing appropriate program segment for this section. Write the prototype function for this program if payment is printed in function CALCULATE_PAYMENT and this function does not return any value,. answer in c++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started