how to write such code in basic?

 

v20240901