Answer:
answer is given below
Explanation:
we write this program in C++ that is given below
and result is attach here
#include <iostream>
using namespace std;
int main() {
int r,g,b,small;
//input values
cin>>r>>g>>b;
//find the smallest value
if(r<g && r<b)
small=r;
else if(g<b)
small=g;
else
small=b;
//subtract smallest of the three values from rgb values hence removing gray
r=r-small;
g=g-small;
b=b-small;
cout<<r<<" "<<g<<" "<<b<<endl;
}