Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in Java I need help on floating point part specifically Many art programs have a tool or filter called Invert Color which converts the on-screen
in Java
I need help on floating point part specifically
Many art programs have a tool or filter called "Invert Color" which converts the on-screen colors and gives you their opposite. For example, a pure red (255,0,0) becomes a bright blue (0,255,255). You will create a program that calculates an inverted color based on what the user enters. Your task is to: a) Ask the user to individually enter in three values between 0 to 255 b) Read those three values in Don't worry about handling values outside that range - we'll learn how to do that later in the semester c) Invert each number d) Display the results e) Convert the inverted colors to floating point numbers f) Display those results You do not need to match the number of decimals precisely, as long as the answer i. correct. Again, we'll learn how to do that later. The algorithm output is as shown below, with user input in bold. Save your source code in a file called Assignment1A (with a file extension of .cpp, .cs or .java) Sample Output: Enter a red value (0255):101 Enter a green value (0255):67 Enter a blue value (0255):33 The inverted color is red=154, green=188, blue=222 With floating points, that would be red=0.6015, green =0.7344, blue =0.8672Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started