Your Personal Positive Attitude (
peacefully) wrote2009-10-27 04:40 pm
(no subject)
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
//Mimi Guarino
//CSC 1230 Date: October 27th, 2009
//HW4- Selection With "If" and One Function
//A program that will output the coorisponding color to an imputed wavelength
#include
#include
using namespace std;
void welcomeUser()
{
cout << "Hello user, welcome to the Color Wavelength-o-tron! \n";
cout << "This program is designed to tell you the relationship between\nwavelength, and color shown on this chart. \n\n";
cout << "\tColor \tWavelength Range\n";
cout << "\tViolet \t0.400-0.424\n";
cout << "\tBlue \t0.424-0.491\n";
cout << "\tGreen \t0.491-0.575\n";
cout << "\tYellow \t0.575-0.585\n";
cout << "\tOrange \t0.585-0.647\n";
cout << "\tRed \t0.647-0.700\n";
cout << "Simply enter your wavelength and let us do the rest!\n";
cout << "\n";
cout << "Enter wavelength: ";
}
int main ()
{
cout << "";
welcomeUser();
double waveLength;
cin >> waveLength;
double violet = 0.418;
double violetBlue = 0.424;
double blueViolet = 0.429;
double blue = 0.485;
double blueGreen = 0.491;
double greenBlue = 0.496;
double green = 0.570;
double greenYellow = 0.575;
double yellowGreen = 0.580;
double yellowOrange = 0.585;
double orangeYellow = 0.590;
double orange = 0.642;
double orangeRed = 0.647;
double redOrange = 0.652;
double red = 0.700;
if (waveLength < 0.400)
cout << setprecision(4) << waveLength << " microns is out of visual range \n";
else if (waveLength <= violet)
cout << setprecision(4) << waveLength << " microns is Violet \n";
else if (waveLength <= violetBlue)
cout << setprecision(4) << waveLength << " microns is Violet on the Violet/Blue border \n";
else if (waveLength <= blueViolet)
cout << setprecision(4) << waveLength << " microns is Blue on the Violet/Blue border \n";
else if (waveLength <= blue)
cout << setprecision(4) << waveLength << " microns is Blue \n";
else if (waveLength <= blueGreen)
cout << setprecision(4) << waveLength << " microns is Blue on the Green/Blue border \n";
else if (waveLength <= greenBlue)
cout << setprecision(4) << waveLength << " microns is Green on the Green/Blue border \n";
else if (waveLength <= green)
cout << setprecision(4) << waveLength << " microns is Green \n";
else if (waveLength <= greenYellow)
cout << setprecision(4) << waveLength << " microns is Green on the Yellow/Green border \n";
else if (waveLength <= yellowGreen)
cout << setprecision(4) << waveLength << " microns is Yellow on the Yellow/Green border \n";
else if (waveLength <= yellowOrange)
cout << setprecision(4) << waveLength << " microns is Yellow on the Orange/Yellow border \n";
else if (waveLength <= orangeYellow)
cout << setprecision(4) << waveLength << " microns is Orange on the Orange/Yellow border \n";
else if (waveLength <= orange)
cout << setprecision(4) << waveLength << " microns is Orange \n";
else if (waveLength <= orangeRed)
cout << setprecision(4) << waveLength << " microns is Orange on the Red/Orange border \n";
else if (waveLength <= redOrange)
cout << setprecision(4) << waveLength << " microns is Red on the Red/Orange border \n";
else if (waveLength <= red)
cout << setprecision(4) << waveLength << " microns is Red \n";
else if (waveLength > 0.700)
cout << setprecision(4) << waveLength << " microns is out of visual range \n";
return 0;
}
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .5
0.500 microns is Green
Press any key to continue . . .
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .4159
0.416 microns is Violet
Press any key to continue . . .
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .585
0.585 microns is Yellow on the Orange/Yellow border
Press any key to continue . . .
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .701
0.701 microns is out of visual range
Press any key to continue . . .
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .486
0.486 microns is Blue on the Green/Blue border
Press any key to continue . . .
TAKE THAT IN YOUR PIPE AND SMOKE IT >:D
EDIT; OKAY, NOW IT'S DONE FOR REAL. WHOLE THING IS UP HERE, AND IT IS GOING ON BLACK BOARD
/trundles off to do math homework
//Mimi Guarino
//CSC 1230 Date: October 27th, 2009
//HW4- Selection With "If" and One Function
//A program that will output the coorisponding color to an imputed wavelength
#include
#include
using namespace std;
void welcomeUser()
{
cout << "Hello user, welcome to the Color Wavelength-o-tron! \n";
cout << "This program is designed to tell you the relationship between\nwavelength, and color shown on this chart. \n\n";
cout << "\tColor \tWavelength Range\n";
cout << "\tViolet \t0.400-0.424\n";
cout << "\tBlue \t0.424-0.491\n";
cout << "\tGreen \t0.491-0.575\n";
cout << "\tYellow \t0.575-0.585\n";
cout << "\tOrange \t0.585-0.647\n";
cout << "\tRed \t0.647-0.700\n";
cout << "Simply enter your wavelength and let us do the rest!\n";
cout << "\n";
cout << "Enter wavelength: ";
}
int main ()
{
cout << "";
welcomeUser();
double waveLength;
cin >> waveLength;
double violet = 0.418;
double violetBlue = 0.424;
double blueViolet = 0.429;
double blue = 0.485;
double blueGreen = 0.491;
double greenBlue = 0.496;
double green = 0.570;
double greenYellow = 0.575;
double yellowGreen = 0.580;
double yellowOrange = 0.585;
double orangeYellow = 0.590;
double orange = 0.642;
double orangeRed = 0.647;
double redOrange = 0.652;
double red = 0.700;
if (waveLength < 0.400)
cout << setprecision(4) << waveLength << " microns is out of visual range \n";
else if (waveLength <= violet)
cout << setprecision(4) << waveLength << " microns is Violet \n";
else if (waveLength <= violetBlue)
cout << setprecision(4) << waveLength << " microns is Violet on the Violet/Blue border \n";
else if (waveLength <= blueViolet)
cout << setprecision(4) << waveLength << " microns is Blue on the Violet/Blue border \n";
else if (waveLength <= blue)
cout << setprecision(4) << waveLength << " microns is Blue \n";
else if (waveLength <= blueGreen)
cout << setprecision(4) << waveLength << " microns is Blue on the Green/Blue border \n";
else if (waveLength <= greenBlue)
cout << setprecision(4) << waveLength << " microns is Green on the Green/Blue border \n";
else if (waveLength <= green)
cout << setprecision(4) << waveLength << " microns is Green \n";
else if (waveLength <= greenYellow)
cout << setprecision(4) << waveLength << " microns is Green on the Yellow/Green border \n";
else if (waveLength <= yellowGreen)
cout << setprecision(4) << waveLength << " microns is Yellow on the Yellow/Green border \n";
else if (waveLength <= yellowOrange)
cout << setprecision(4) << waveLength << " microns is Yellow on the Orange/Yellow border \n";
else if (waveLength <= orangeYellow)
cout << setprecision(4) << waveLength << " microns is Orange on the Orange/Yellow border \n";
else if (waveLength <= orange)
cout << setprecision(4) << waveLength << " microns is Orange \n";
else if (waveLength <= orangeRed)
cout << setprecision(4) << waveLength << " microns is Orange on the Red/Orange border \n";
else if (waveLength <= redOrange)
cout << setprecision(4) << waveLength << " microns is Red on the Red/Orange border \n";
else if (waveLength <= red)
cout << setprecision(4) << waveLength << " microns is Red \n";
else if (waveLength > 0.700)
cout << setprecision(4) << waveLength << " microns is out of visual range \n";
return 0;
}
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .5
0.500 microns is Green
Press any key to continue . . .
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .4159
0.416 microns is Violet
Press any key to continue . . .
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .585
0.585 microns is Yellow on the Orange/Yellow border
Press any key to continue . . .
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .701
0.701 microns is out of visual range
Press any key to continue . . .
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .486
0.486 microns is Blue on the Green/Blue border
Press any key to continue . . .
TAKE THAT IN YOUR PIPE AND SMOKE IT >:D
EDIT; OKAY, NOW IT'S DONE FOR REAL. WHOLE THING IS UP HERE, AND IT IS GOING ON BLACK BOARD
/trundles off to do math homework

no subject
/slowly backs into a corner
no subject
I'M SO BAD AT AT
AND NOW I'M PISSED
MY ANSWER AREN'T COMING OUT RIGHT
THEY SHOULD HAVE THREE NUMBERS AFTER THE DECIMAL POINT BUT IF I ENTER .5 IT COMES OUT 0.5.... NOT 0.500 LIKE I THINK SHE WANTS
BUT I'M SO OVER THIS
/cries in a corner
no subject
I have to drop my Java class this semester rofl. orz I got off on the wrong foot.
no subject
Oh sad. What are you working on instead?
no subject
I have no idea adlkjjakj Just... my other classes. English, psychology, sociology... idk. Must get my shit together. orz
no subject
no subject
no subject
no subject
no subject
no subject
/just edited it like two seconds ago
no subject
but if that is what your teacher told you to do go for it
no subject
/will mooch off of you for help >:)
no subject
it is the best
no subject
no subject
WHY ARE THERE SMART PROGRAMMING PEOPLE ON MY FLIST /PEES
no subject
I'M SO BAD AT THIS /flails
no subject
no subject
no subject
IT LOOKS PRETTIER IN VISUAL STUDIOS ;_;
AND I'VE BEEN TINKERING FOR EVER
I NEED TO PAY MORE ATTENTION IN CLASS /sobs
IT'S STILL WROOOOONG
no subject
I LOOK AT IT AND MY BRAIN LIKE... FIZZLES
no subject
Hello user, welcome to the Color Wavelength-o-tron!
This program is designed to tell you the relationship between
wavelength, and color shown on this chart.
Color Wavelength Range
Violet 0.400-0.424
Blue 0.424-0.491
Green 0.491-0.575
Yellow 0.575-0.585
Orange 0.585-0.647
Red 0.647-0.700
Simply enter your wavelength and let us do the rest!
Enter wavelength: .5
0.500 microns is Green
Press any key to continue . . .
AND I JUST GOT IT TO WORK
I PUT IN .5
AND .500 CAME OUT
I'M SO HAPPY
no subject
no subject
/pumps fist to inspirational music
no subject
If only troubleshooting with this kind of code was more advanced than "oh you have a syntax error in your FOURTEEN PAGES OF CODE"... one day, it'll have to be.
no subject
I know, I'm not looking forward to have long butt codes -_- but... I'll be better at them then? probably XD
no subject
Hahaha! Maybe you will.
no subject
TAKE THAT CODE
It is on! >:3
no subject
no subject
no subject
no subject
no subject
no subject
no subject
no subject
pretty much, last class where we talked about this stuff I completely zoned out during class, so I pretty much just dove into the book having no idea how to do this, and worked by trial and error. All in all == very bad plan.
not to mention I'm not really that gifted at this XD I just find it weirdly fun in a way
no subject
no subject
no subject
no subject
no subject
no subject
no subject
no subject
they're ninja code
no subject
no subject
no subject