Advertisement
elephantsarecool

4

Sep 17th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.13 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int a,b,n;
  6.     cin >> a >> b >> n;
  7.     cout << "a["<<n<<"] = "<<(b-a)*(n-1)+a;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement