Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan, Escape: close
Comp Sci 2
Flowcharts should be clear and concise.
Pseudocode:
- BEGIN
- INPUT(NUM1, NUM2)
- TOTAL $\leftarrow$ NUM1 * NUM2
- This is defining a variable in pseudocode.
- OUTPUT(TOTAL)
- END
Pseudocode Algorithm Activity:
- BEGIN
- INPUT(NUM1, NUM2)
- TOTAL $\leftarrow$ NUM1 * NUM2
- OUTPUT(TOTAL)
- END
- BEGIN
- INPUT(FAHRENHEIT)
- CELCIUS $\leftarrow$ (FAHRENHEIT-32)*5/9
- OUTPUT(CELCIUS)
- END
- BEGIN
- INPUT(STUDHEIGHT, STUDNUM)
- AVERAGE $\leftarrow$ STUDHEIGHT/STUDNUM
- OUTPUT(STUDHEIGHT)
- END
- BEGIN
- INPUT(ITEMPRICE)
- FINALPRICE $\leftarrow$ ITEMPRICE * 0.9
- OUTPUT(FINALPRICE)
- END
- BEGIN
- INPUT(STUDENTNAME, STUDENTMARK)
- IF STUDENTMARK >= 50 THEN
- GRADE $\leftarrow$ PASS
- ELSE
- GRADE $\leftarrow$ FAIL
- OUTPUT(STUDENTNAME, GRADE)
- END
- BEGIN
- INPUT(AGE)
- IF AGE >= 18 THEN
- ENTRANCE $\leftarrow$ YES
- ELSE
- ENTRANCE $\leftarrow$ NO
- OUTPUT(ENTRANCE)
- END
- BEGIN
- INPUT(NUM1, NUM2)
- TOTAL $\leftarrow$ NUM1 * NUM2
- OUTPUT(TOTAL)
- END
- BEGIN
- INPUT(BARS)
- IF (BARS*2.1) >= 11 THEN
- MESSAGE $\leftarrow$ Buy them!
- ELSE
- MESSAGE $\leftarrow$ You can't afford that many
- OUTPUT(MESSAGE)
- END
- BEGIN
- INPUT(MARK)
- IF MARK >= 85 THEN
- GRADE $\leftarrow$ High Distinction
- ELIF MARK >= 75 THEN
- GRADE $\leftarrow$ Distinction
- ELIF MARK >= 65 THEN
- GRADE $\leftarrow$ Credit
- ELIF MARK >= 50 THEN
- GRADE $\leftarrow$ PASS
- ELSE
- GRADE $\leftarrow$ FAIL
- OUTPUT(GRADE)
- END