Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions