NALLAMUTHU GOUNDER MAHALINGAM COLLEGE
POLLACHI-642001
N.DHIVYA
BSC COMPUTER SCIENCE(1st year)
9.Traffic signal
#include <iostream>
int main()
{
for(int
i=1;i<=30;i++)
{
std::cout<<"stop"<<std::endl;
std::cout<<i<<"\n";
}
for(int
i=1;i<=40;i++)
{
std::cout<<"ready"<<std::endl;
std::cout<<i<<"\n";
}
for(int
i=1;i<=70;i++)
{
std::cout<<"go"<<std::endl;
std::cout<<i<<"\n";
}
return 0;
}
OUTPUT: