A mean-value Approach to solve fractional differential and integral equations