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

Define Variable

This program registers masqueraders for a carnival band and assigns them to sections based on their costume price. It collects each masquerader's name, costume price, payment method (full payment or installments), and payment amount. It then displays the total number of masqueraders registered in each section and the total payment collected.

Uploaded by

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

Define Variable

This program registers masqueraders for a carnival band and assigns them to sections based on their costume price. It collects each masquerader's name, costume price, payment method (full payment or installments), and payment amount. It then displays the total number of masqueraders registered in each section and the total payment collected.

Uploaded by

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

START

PARTY_STARS :AN INTEGER = 160;

VIRAL_BAND: AN INTEGER = 220;

ROAD_RUNNER: AN INTGER = 280;

NO_MADS: AN INTEGER = 350;

FURIOUS_FIVE: AN INTEGER = 425;

DEFINE Full_name: array[1..25] of string;

DEFINE payment:array [1..25]of INTEGER ;

DEFINE section_number : array[1..25] of INTEGER ;

DEFINE VARIABLE

TOTAL,

sec1_payment,

SEC1_TOTAL,

sec2_payment,

SEC2_TOTAL,

sec3_payment, INTEGER;

SEC3_TOTAL,

sec4_payment,

SEC4_TOTAL,

sec5_payment,

SEC5_TOTAL,

COUNT,

section_payment

TOTAL:=0;

sec1_payment:=0;

SEC1_TOTAL:=0;

sec2_payment:=0;

SEC2_TOTAL:=0;

sec3_payment:=0;
SEC3_TOTAL:=0;

section_payment:= 0,

sec4_payment:=0;

SEC4_TOTAL:=0;

sec5_payment:=0;

SEC5_TOTAL:=0;

DISPLAY' _____________________________________________________________';

DISPLAY' / \';

DISPLAY' | NAME: PETA-GAYE HAMIL |';

DISPLAY' | WELCOME TO MY CARNIVAL BAND |';

DISPLAY' | PLEASE PROCEED |';

DISPLAY' \_____________________________________________________________/';

DISPLAY 'PLEASE STATE HOW MANY PEOPLE YOU ARE REGISTERING';

INPUT TOTAL;

DISPLAY'Thank you’

FOR COUNT:=1 TO TOTAL DO

DISPLAY ‘ ENTER THE FULL NAME OF THE MASQUERADER';

INPUT Full_name[COUNT];

DISPLAY'STATE THE COSTUME PRICE ';

DISPLAY'COSTUME PRICES ARE $160,$220,$280,$350 AND $425.';

INPUT section_payment;

IF section_payment = PARTY_STARS THEN

DISPLAY Full_name[COUNT],' YOU BELONG TO PARTY_STARS SECTION';

DISPLAY ' DO YOU WANT PAY ON FULL PAYMENT OF $144' ;

DISPLAY 'OR THREE INSTALLMETS OF $61 PER INSTALLMENT’;

DISPLAY 'ENTER PAYMENT HERE -->$ ';

INPUT payment[COUNT];

sec1_payment:= sec1_payment + 1 ;

SEC1_TOTAL:= SEC1_TOTAL + payment[COUNT];


section_number[COUNT]:=1 ;

ELSE;

IF section_payment=VIRAL_BAND THEN

DISPLAY Full_name[COUNT],' YOU BELONG TO REAL MADRID SECTION';

DISPLAY ' DO YOU WANT PAY ON FULL PAYMENT OF $198' ;

DISPLAY 'OR THREE INSTALLMETS OF $84 PER INSTALLMENT’;

DISPLAY 'ENTER PAYMENT HERE -->$ ';

INPUT payment[COUNT];

sec2_payment:= sec2_payment + 1 ;

SEC2_TOTAL:= SEC2_TOTAL + payment[COUNT];

section_number[COUNT]:=2 ;

ELSE;

IF section_payment=ROAD_RUNNER THEN

DISPLAY Full_name[COUNT],' YOU BELONG TO MANCHESTER UNITED SECTION';

DISPLAY ' DO YOU WANT PAY ON FULL PAYMENT OF $252' ;

DISPLAY 'OR THREE INSTALLMETS OF $107 PER INSTALLMENT’;

DISPLAY 'ENTER PAYMENT HERE -->$ ';

INPUT payment[COUNT];

sec3_payment:=sec3_payment + 1 ;

SEC3_TOTAL:=SEC3_TOTAL + payment[COUNT];

section_number[COUNT]:=3 ;

ELSE;

IF section_payment=NO_MADS THEN

DISPLAY Full_name[COUNT],' YOU BELONG TO MANCHESTER CITY SECTION';

DISPLAY ' DO YOU WANT PAY ON FULL PAYMENT OF $315' ;

DISPLAY 'OR THREE INSTALLMETS OF $134 PER INSTALLMENT’;

DISPLAY 'ENTER PAYMENT HERE -->$ ';

INPUT payment[COUNT];
sec4_payment:= sec4_payment + 1 ;

SEC4_TOTAL:=SEC4_TOTAL + payment[COUNT];

section_number[COUNT]:=4 ;

ELSE

IF section_payment=FURIOUS_FIVE THEN

DISPLAY Full_name[COUNT],' YOU BELONG TO FURIOUS_FIVE SECTION';

DISPLAY ' DO YOU WANT PAY ON FULL PAYMENT OF $383' ;

DISPLAY 'OR THREE INSTALLMETS OF $162 PER INSTALLMENT’;

DISPLAY 'ENTER PAYMENT HERE -->$ ';

INPUT payment[COUNT];

sec5_payment:= sec5_payment + 1 ;

SEC5_TOTAL:=SEC5_TOTAL + payment[COUNT];

section_number[COUNT]:=5 ;

ENDIF;

ENDIF;

ENDIF;

ENDIF;

ENDIF;

ENDFOR;

DISPLAY 'MASQURADER NAME ', '-----------------', 'SECTION NUMBER ';

FOR COUNT:=1 TO TOTAL DO

DISPLAYFull_name[COUNT],'-----------------------------',section_number[COUNT];

DISPLAY'SECTION','--------------','AMOUNT IN SECTION', '--------------','TOTAL PAYMENT';

DISPLAY'Section 1','-----------------',sec1_payment,'------------------------------',SEC1_TOTAL;

DISPLAY'Section 2','-----------------',sec2_payment,'------------------------------',SEC2_TOTAL;

DISPLAY'Section 3','-----------------',sec3_payment,'------------------------------',SEC3_TOTAL;

DISPLAY'Section 4','-----------------',sec4_payment,'------------------------------',SEC4_TOTAL;

DISPLAY'Section 5','-----------------',sec5_payment,'------------------------------',SEC5_TOTAL;
ENDFOR;

END.

You might also like