Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
TASK 1
INPUT “Enter slab Colour: ”,SColour
INPUT “Enter Depth of Slab: ”,SDepth
WHILE (SDepth <>45) OR (SDepth<>38) DO
INPUT “Enter Depth of Slab: ”,SDepth
ENDWHILE
INPUT “Enter Shape Type: Square or Rectangular or Round: ”,SShape
UPriceGrey 0.05
CASE SShape OF
“Square”: INPUT “Enter Square size: 600 or 450 :”, ShapeDimension
WHILE (ShapeDimension<>600) OR (ShapeDimension<>450) DO
INPUT “Enter Square size: 600 or 450 :”, ShapeDimension
ENDWHILE
UVolume ShapeDimension* ShapeDimension*SDepth
UPrice (UVolume/100000)* UPriceGrey
TotalPriceGrey UPrice*20
“Rectangular”: INPUT “Enter Rectangle height: 700 or 450 :”, ShapeDimension
WHILE (ShapeDimension<>700) OR (ShapeDimension<>450) DO
INPUT “Enter Rectangle height: 700 or 450 : ”, ShapeDimension
ENDWHILE
UVolume 600* ShapeDimension*SDepth
UPrice (UVolume/100000)* UPriceGrey
TotalPriceGrey UPrice*20
“Round”: INPUT “Enter Diameter: 300 or 450 :”, ShapeDimension
WHILE (ShapeDimension<>300) OR (ShapeDimension<>450) DO
INPUT “Enter Diameter: 300 or 450: ”, ShapeDimension
ENDWHILE
UVolume ShapeDimension* ShapeDimension*3.14*SDepth
UPrice (UVolume/100000)* UPriceGrey
TotalPriceGrey UPrice*20
OTHERWISE: OUTPUT “INVALID SHAPE TYPE”
ENDCASE
TotalPriceRG TotalPriceGrey+( TotalPriceGrey*10/100)
TotalPriceCust TotalPriceGrey+( TotalPriceGrey*15/100)
//OUTPUT SLAB DETAILS
OUTPUT “CHOSEN COLOUR: ”,SColour
OUTPUT “DEPTH OF SLAB: ”,SDepth
OUTPUT “SHAPE TYPE: ”,SShape
OUTPUT “SHAPE DIMENSION: ”,ShapeDimension
IF (SColour=”Grey”)
THEN OUTPUT “PRICE OF A BATCH OF 20 SLABS: ”,TotalPriceGrey
ELSE
IF (SColour=”Red”) OR (SColour=”Green”)
THEN OUTPUT “PRICE OF A BATCH OF 20 SLABS: ”,TotalPriceRG
ELSE OUTPUT “PRICE OF A BATCH OF 20 SLABS: ”,TotalPriceCust
ENDIF
ENDIF
TASK 2
INPUT NumberOfSlabs
WHILE (NumberOfSlabs<20) OR (NumberOfSlabs>100) DO
INPUT NumberOfSlabs
ENDWHILE
Remainder NumberOfSlabs MOD 20
IF (Remainder<>0)
THEN
NumberOfSlabs NumberOfSlabs+(20-Remainder)
ENDIF
NumberOfBatch NumberOfSlabs/20
OUTPUT “NUMBER OF SLABS: ”, NumberOfSlabs
OUTPUT “NUMBER OF BATCH: ”, NumberOfBatch
IF (SColour=”Grey”)
THEN
OrderPrice NumberOfBatch*TotalPriceGrey
ELSE
IF (SColour=”Red”) OR (SColour=”Green”)
THEN
OrderPrice NumberOfBatch*TotalPriceRG
ELSE
OrderPrice NumberOfBatch*TotalPriceCust
ENDIF
ENDIF
OUTPUT “ORDER PRICE: ”,OrderPrice
TASK 3
INPUT UPriceGrey
INPUT GradeOfConcrete
WHILE (GradeOfConcrete<>”basic”) OR (GradeOfConcrete<>”best”)
INPUT GradeOfConcrete
ENDWHILE
IF (GradeOfConcrete=”best”)
THEN
UPriceGrey UPriceGrey/0.965
ENDIF