Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #define long long int
  3. using namespace std;
  4. main()
  5. {
  6. int s1 , s2 , s3 , f1 , f2 , f3 , n;
  7. cin >> s1 >> s2 >> s3 >> f1 >> f2 >> f3 >> n;
  8. int rez1 = f1 - s1 , rez2 = f2 - s2 , rez3 = f3 - s3;
  9. rez1 /= (n-1) , rez2 /= (n-1) , rez3 /= (n-1);
  10. for(int i = 1 ; i < n ; ++i)
  11. {
  12. cout << s1 << ", " << s2 << ", " << s3 << endl;
  13. s1+=rez1 , s2+=rez2 , s3+=rez3;
  14. }
  15. cout << f1 << ", " << f2 << ", " << f3 << endl;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement