Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int R1,G1,B1,R2,G2,B2,n;
- cin>>R1>>G1>>B1>>R2>>G2>>B2>>n;
- cout<<R1<<", "<<G1<<", "<<B1<<'\n';
- --n;
- int r=R2-R1,g=G2-G1,b=B2-B1;
- for(int i=1;i<=n;++i)
- cout<<(int)(R1+r*i/(float)n)<<", "<<(int)(G1+g*i/(float)n)<<", "<<(int)(B1+b*i/(float)n)<<'\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement