0% found this document useful (0 votes)
7 views5 pages

PROGRAM MashramaniBand

The document is a program written in Pascal that collects reveler details including name and payment amount. It determines the section and payment method based on the payment amount, allowing for cash or installment options. The program also calculates and displays installment amounts if applicable and outputs the reveler's details at the end.

Uploaded by

alicewonderjd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views5 pages

PROGRAM MashramaniBand

The document is a program written in Pascal that collects reveler details including name and payment amount. It determines the section and payment method based on the payment amount, allowing for cash or installment options. The program also calculates and displays installment amounts if applicable and outputs the reveler's details at the end.

Uploaded by

alicewonderjd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

PROGRAM MashramaniBand;

VAR

Name: STRING;

PaymentAmount: REAL;

Section, PaymentMethod: STRING;

InstallmentAmount: REAL;

BEGIN

// Step 1: Input reveler details

WRITELN('Enter Reveler’s Name: ');

READLN(Name);

WRITELN('Enter Payment Amount: ');

READLN(PaymentAmount);

// Step 2: Determine payment method and section

IF PaymentAmount = 144 THEN

BEGIN

Section := 'Flora and Fauna';

PaymentMethod := 'Cash';
END

ELSE IF PaymentAmount = 162 THEN

BEGIN

Section := 'Flora and Fauna';

PaymentMethod := 'Installment';

END

ELSE IF PaymentAmount = 198 THEN

BEGIN

Section := 'Birds';

PaymentMethod := 'Cash';

END

ELSE IF PaymentAmount = 253 THEN

BEGIN

Section := 'Birds';

PaymentMethod := 'Installment';

END

ELSE IF PaymentAmount = 252 THEN

BEGIN

Section := 'Natural Resources';


PaymentMethod := 'Cash';

END

ELSE IF PaymentAmount = 322 THEN

BEGIN

Section := 'Natural Resources';

PaymentMethod := 'Installment';

END

ELSE IF PaymentAmount = 315 THEN

BEGIN

Section := 'National Wonder';

PaymentMethod := 'Cash';

END

ELSE IF PaymentAmount = 403 THEN

BEGIN

Section := 'National Wonder';

PaymentMethod := 'Installment';

END

ELSE IF PaymentAmount = 383 THEN

BEGIN
Section := 'Tourism';

PaymentMethod := 'Cash';

END

ELSE IF PaymentAmount = 489 THEN

BEGIN

Section := 'Tourism';

PaymentMethod := 'Installment';

END

ELSE

BEGIN

WRITELNLN('Invalid payment amount. Please check and try again.');

HALT;

END;

// Step 3: Handle installment payments

IF PaymentMethod = 'Installment' THEN

BEGIN

InstallmentAmount := PaymentAmount / 3;

WRITELNLN('You have chosen installment payment.');


WRITELNLN('Each installment payment is: ', InstallmentAmount:0:2);

END;

// Step 4: Display reveler details

WRITELNLN('Reveler Name: ', Name);

WRITELNLN('Assigned Section: ', Section);

WRITELNLN('Payment Method: ', PaymentMethod);

WRITELNLN('Total Amount Paid: ', PaymentAmount:0:2);

END.

You might also like