Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- cout.setf(ios::fixed);
- cout.precision(4);
- double x,f_de_x,f_de_y;
- double exponencial=1;
- cin >> x >> f_de_y;
- while(cin >> f_de_x){
- exponencial=exponencial*x;
- f_de_y+=f_de_x*exponencial;
- }
- cout << f_de_y << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment