You are on page 1of 7

PASCAL PROGRAM

Program Ashawny_Distribution_Limited;

{This Program was created by k.Fearon}

{This Program was created on the 2nd of April}

{Ezy pastal Software was used to create this program}

{This Program was Created all sales and income for the Stakeholders}

Const

Num_of_Mag = 25;

Quantity_200 = 0.1;

Quantityg_200 = 0.2;

Var

Mag_C :String;

Mag_T :String;

Mg_T :String;

Quantity :Integer;

Unit_C: Real;

Sales: Real;

P_To_P: Real;

Client_C :Real;

D_Income: Real;

Count, Counter, Countercomp: integer;

CounterSport, counterFashion, CounterHome: Integer;

CounterDecor: Integer;
Begin

P_To_P:= 0;

Count:= 0;

Counter:= 0;

WriteLn ('Welcome to Ashawny Distribution Limited');

WriteLn ('My Program is to calculate all sales and payment amount for my company');

WriteLn
('~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@
~@~@~@~@~@~@');

WriteLn;

CounterComp:= 0;

CounterFashion:= 0;

CounterSport:= 0;

CounterDecor:= 0;

CounterHome:= 0;

While counter <= Num_Of_Mag Do

Counter:= Counter + 1;

Begin

WriteLn;
WriteLn (' Enter your Magazine Code');

ReadLn (Mag_C);

WriteLn (' Declare your Magazine Title');

ReadLn (' mag_T');

WriteLn ('Your Magazine should belong to one of the following type: Computer, Fashion, Sports, Home
or Decorating');

WriteLn;

WriteLn ('Enter the Magazine Type from the list above');

WriteLn ('Enter the type using inital caps, eg Sports or Fashion');

WriteLn;

WriteLn ('State the total quantity of magazine needed');

ReadLn (Quantity);

WriteLn ('State the Unit Cost');

ReadLn (Unit_C);

WriteLn ('Enter the amount of Sales');

ReadLn (Sales);

WriteLn ('State the payment of Publisher amount');

ReadLn (P_To_p);

WriteLn ('Enter Client Commission');

ReadLn (Client_C);

WriteLn (' State the Distributor Income');

ReadLn (D_Income);

If Quantity <=200 then


Client_C := Quantity_200 * sales

Else

Client_C:= Quantity*Sales

End;

If (Mag_T = 'Computer') Then

begin

Unit_c:= 100;

Sales:= Quantity*Unit_C;

CounterComp:= CounterComp +1;

End;

If Mag_T = 'Fashion' then;

begin

Unit_c:= 112 ;

Sales:= Quantity*Unit_C;

CounterFashion:= CounterFashion +1;

End;

If Mag_T = 'Sports' then

begin
Unit_C:= 134;

Sales:= Quantity*Unit_C;

CounterSport:= CounterSport +1;

End;

If Mag_T = 'Decor' then

begin

Unit_C:= 105;

Sales:= Quantity*Unit_C;

CounterComp:= CounterComp +1;

End;

If Mag_T = 'Home' then

begin

Unit_C:= 167;

Sales:= Quantity*Unit_C;

CounterComp:= CounterComp +1

end

Else If Mag_T ='Computer' then

begin

Unit_c:= 100;

Sales:= Quantity*Unit_C;

CounterComp:= CounterComp +1;


End;

WriteLn (counter);

End.

Else If Mag_T = 'Fashion'

begin

Unit_c:= 112 ;

Sales:= Quantity*Unit_C;

CounterFashion:= CounterFashion +1;

End;

WriteLn (counter);

End.

Else If Mag_T = 'Sports'

begin

Unit_C:= 134;

Sales:= Quantity*Unit_C;

CounterSport:= CounterSport +1;

End;

WriteLn (counter);

End.

Else If Mag_T = 'Decor'

begin

Unit_C:= 105;

Sales:= Quantity*Unit_C;
CounterComp:= CounterComp +1;

End;

WriteLn (counter);

End.

WriteLn (' The total amount for Fashion is', counterfashion);

WriteLn (' The Sales figure for Home is', Sales);

WriteLn;

WriteLn (' The amount for Decorating Magazines is:', counterDecor);

WriteLn (' The Sales figure for Sports is:', Sales);

WriteLn;

WriteLn (' The total amount for Computer is', CounterComp);

WriteLn; WriteLn ('The sales figure for computer

end.

You might also like