Given colors, subtract the fade value and print
What is wrong with the following C# code? It should take the given colors and subtract the given fadeValue and then print out the new faded values. Please copy and paste the code into your response and fix it so that it works correctly.
using System;
namespace PCD
{
class MainClass
{
static void Main(string[] args)
{
int red=110;
int green=220;
int blue=230;
getFadedColor(red, green, blue, 10);
getFadedColor(red, green, blue, 20);
Console.WriteLine("red: " + red);
Console.WriteLine("green: " + green);
Console.WriteLine("blue: " + blue);
}
static void getFadedColor(int red, int green, int blue, int fadeValue)
{
red -= fadeValue;
green -= fadeValue;
blue -= fadeValue;
}
}
}
Questions by musclebai answers by musclebai
Showing Answers 1 - 4 of 4 Answers
Related Answered Questions
Related Open Questions
Given colors, subtract the fade value and print
using System;
namespace PCD
{
class MainClass
{
static void Main(string[] args)
{
int red=110;
int green=220;
int blue=230;
getFadedColor(red, green, blue, 10);
getFadedColor(red, green, blue, 20);
Console.WriteLine("red: " + red);
Console.WriteLine("green: " + green);
Console.WriteLine("blue: " + blue);
}
static void getFadedColor(int red, int green, int blue, int fadeValue)
{
red -= fadeValue;
green -= fadeValue;
blue -= fadeValue;
}
}
}
Profile Answers by musclebai Questions by musclebai
Questions by musclebai answers by musclebai
Related Answered Questions
Related Open Questions