// Code derived from Stroustrup's PPP2 book// § 4.4.1.1 if-statements// -beginning on p 102#include<iostream>usingstd::cout;voidgo(){cout<<"go\n";}voidwait(){cout<<"wait\n";}intmain(){constexprintgreen=1;constexprintred=3;inttraffic_light=1;if(traffic_light==green)go();if(traffic_light==red)wait();//---cout<<'\n';// here simply to separate the console outputstraffic_light=3;// set traffic_light to 3 nowif(traffic_light==green)go();if(traffic_light==red)wait();}