14- The following script is used to find the series (g = 1+ e-x+2e-2x + 3e-3r + + %3D 10e-10x) * #include #include using namespace std; int main (0

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter9: Records (struct)
Section: Chapter Questions
Problem 12SA
icon
Related questions
Question
I need the answer as soon as possible
14- The following script is used to find the
series (g = 1+ e-x+2e-2x + 3e-3x + +
%3D
10e-10x) *
#include <iostream>
#include<math.h>
using namespace std;
int main ()
{int i;
float g=1.0 ,x;
cin>>x;
for(i=1; i<=10;i++){
s=s+ *exp(-i*x);
cout<<"g=l'<<g;}
return 0;
}
true
O False
Transcribed Image Text:14- The following script is used to find the series (g = 1+ e-x+2e-2x + 3e-3x + + %3D 10e-10x) * #include <iostream> #include<math.h> using namespace std; int main () {int i; float g=1.0 ,x; cin>>x; for(i=1; i<=10;i++){ s=s+ *exp(-i*x); cout<<"g=l'<<g;} return 0; } true O False
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning