You are on page 1of 2

M12_CSQ2] Milk is collected for sales from the nearest ‘n’ farms to the milk booth.

Given
the amount of milk from ‘n’ farms in liters and ml. Write a PAC chart, algorithm, and
flowchart to compute the total quantity of milk in the booth. [CO1] [L1]

PAC
DATA PROCESSING OUTPUT
Input number of farms n • Process iteration from i=1 to Print total_lit
Input lit1, ml1 n to input litres & ml for Print total_ml
Input llt2,ml2 each form and calculate
Input upto lit[n],ml[n] total litres and total ml
total_lit = total_lit + litl[i]
total_ml = total_ml[i] + ml[i]
• If total_ml >=1000 then
calculate total_lit= total_lit +
total_ml/1000
and total_ml =
total_ml%1000

ALGORITHM

START
STEP 1: READ n
STEP 2: Process iteration for n inputs
STEP 3: READ l1, m1, l2, m2,….ln,mn
STEP 4: Process iteration for n times to calculate total litres and ml by taking sum of litres in
total_lit and sum of ml in total_ml
STEP 5: If total-ml is greater than 1000 then calculate total_lit as sum of total_lit + quotient of
total_ml divided by 1000 and total_ml as total_ml modulus 1000
STEP 6: Print total_lit, total_ml
STOP

FLOWCHART

You might also like