samedi 25 septembre 2021

If statement remove of grey

I have this problem in class to remove the grey with input values 130 50 130 and the output 80 0 80 With my coding problem I get 1300 here's my code.

Integer red
Integer blue
Integer green
Integer grey

Red = Get next input
Blue = Get next input
Green = Get next input
Grey = 0

if red < green
red = grey
else
  blue = grey
if red < blue
  green = blue

Put red - grey to output
Put "" to output
Put blue - grey to output

Aucun commentaire:

Enregistrer un commentaire