The first term of an A.P. is 5, the last term is 45 and the sum is 400. Find the number of terms and the common difference.
The first and last term of an A.P are 5 and 45 respectively. If the sum of all the terms is 400, find the common difference.