Question: //header files #include using namespace std; //a global counter variable int counter=0; //main() method int main() { double wavelength;//this variable will store wavelength //prompting user

//header files

#include

using namespace std;

//a global counter variable

int counter=0;

//main() method

int main()

{

double wavelength;//this variable will store wavelength

//prompting user for the wavelength

cout << "Please input a wavelength between 400.0 and 700.0: ";

cin >> wavelength;//reading wavelength

//counter++;//increment the counter

//checking wavelength

if (++counter,wavelength < 400.0)

{

//when wavelength is less than 400 then

cout << "Wavelength too small."<< endl;

}

else if (++counter,wavelength >= 400.0 && wavelength < 445.0)

{

//when wavelength is between 400 to 445

cout << "Your wavelength corresponds to the color Violet." ;

}

else if (++counter,wavelength >= 445.0 && wavelength < 475.0)

{

//when wavelength is between 445 to 475

cout << "Your wavelength corresponds to the color Indigo." ;

}

else if (++counter,wavelength >= 475.0 && wavelength < 510.0)

{

//when wavelength is between 475 to 510

cout << "Your wavelength corresponds to the color Blue.";

}

else if (++counter,wavelength >= 510.0 && wavelength < 570.0)

{

//when wavelength is between 510 to 570

cout << "Your wavelength corresponds to the color Green." ;

}

else if (wavelength >= 570.0 && wavelength < 590.0)

{

//when wavelength is between 570 to 590

cout << "Your wavelength corresponds to the color Yellow." ;

}

else if (++counter,wavelength >= 590.0 && wavelength < 650.0)

{

//when wavelength is between 590 to 650

cout << "Your wavelength corresponds to the color Orange." ;

}

else if (++counter,wavelength >= 650.0 && wavelength <= 700.0)

{

//when wavelength is between 650 to 700

cout << "Your wavelength corresponds to the color Red." ;

}

else if(++counter,wavelength > 700.0)

{

//when wavelength is greater than 700

cout << "Wavelength too large." ;

}

cout<

cout << endl<<"Thank-you for using our program!" << endl;

return 0;

What will a raptor flow chart of this program look like

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!