+ 2
Question
2.Design a program or code which will find the number of nth term in arithmetic progression
2 Answers
+ 16
AP(nth term) = a + (n-1)d, where a is first term and d is arithmetic difference, if I'm not mistaken.
+ 15
int n;
cin >> n;
cout << getTerm(n);
// The getTerm method will depend on what arithmetic progression you are using