1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
frez [133]
3 years ago
12

Write a program that takes a value x as input and outputs this sum for n taken to be each of the values 1 to 100. The program sh

ould also output ex calculated using the predefined function exp. The function exp is a predefined function such that exp(x) returns an approximation to the value ex. The function exp is in the library with the header file cmath. Your program should repeat the calculation for new values of x until the user says she or he is through
Computers and Technology
1 answer:
jenyasd209 [6]3 years ago
4 0

Explanation:

#include <iostream.h>

#include <conio.h>

#include <math.h>

main ()

{

     int x;

     double sum, fact;

     char ans;

     do

     {

           cout << "Please enter the value x: ";

           cin >> x;

           cout << endl;

           sum = fact = 1;

 

              for (int n=1; n<=100; n++)

           {

             for (int i=0; i<n; i++)

                 {

                   fact = n*fact;

                        }

             sum += (pow(x,n)/fact);

                       

        cout <<"n = "<<n<<" and sum = "<< sum << " and

        exp("<<x<<") = "<<exp(x)<<endl;

                }

        cout << endl;

       cout << "Do you want to calculate this again? (y/n): ";

        cin >> ans;

 } while (ans == 'y' || ans == 'Y');

getch ();

}

You might be interested in
Write a program that will input two numbers and print the larger number on the screen.
Stella [2.4K]

num1 = float(input("Enter the first number: "))

num2 = float(input("Enter the second number: "))

if num1 > num2:

   print(num1)

else:

   print(num2)

I hope this helps!

8 0
3 years ago
A debate about city schools are more better than village schools​
Vladimir [108]
No it is not because village school is the traditional education
6 0
3 years ago
Write the technical terms for the following statements: The repeated working capacity of computer.
ozzi

The technical terms for the statement "The repeatedly working capacity of computer" is  known to be "diligence.

<h3>Why is the working capacity of computer" known to be "diligence."?</h3>

The capacity of a computer is known to be one that carry out or performs a lot of task in a repetitive manner without getting tired and as such, one can say the computer is diligent.

Note therefore that The technical terms for the statement "The repeatedly working capacity of computer" is  known to be "diligence.

Learn more about computer from

brainly.com/question/24540334

#SPJ1

8 0
2 years ago
Multiple Choice
earnstyle [38]
1 )  B ) I<span>ntersections.
2 ) A ) Freeways ( i believe )
Matchmaking
-</span><span>Retractable STOP sign arm ( school bus ) 
-Jaywalking ( d</span><span>angerous pedestrian practice ) 
- Moped ( </span><span>cross between bicycle and motorcyble ) 
1 ) I would say the </span><span>major cause of collisions between cars and motorcycles is due to motorcycles driving into lane/places cars can not get into. - lane splitting, traffic jam - 
2 )When there is a yeild sign or a crossing sign, it's </span><span>legal for a pedestrian to cross a roadway. ( I believe )
3)</span><span> Motorists must keep a constant lookout for pedestrians crossing and at intersections. 
4) I know when trucks are driving up or anything similar they get faster and sometimes cant control, so there are certian stops that trucks go up to make them slow down. I honeslty don't know if you should go around or not. But i hope this helps.
</span>
7 0
3 years ago
____ is any technology that aids in gathering information about a person or organization without their knowledge.
DanielleElmas [232]

Answer:

Spyware

Explanation:

In most cases, a spywares are unwanted software enters into your computer or other devices and steal sensitive information, your internet usage data, and other information. Spyware is considered a malware type and a malicious one that is aimed at damaging a device or gaining control and access without the knowledge of the owner.

4 0
3 years ago
Other questions:
  • What is the name of Louis and Auguste Lumiere's invention that incorporated a camera, a printer, and a project all in one machin
    8·1 answer
  • Which css property is used to change the text color of an element?
    15·1 answer
  • What types of issues can you most likely resolve by knowing how to access and use the control panel choose all that apply?
    10·1 answer
  • Https://intro.edhesive.com/courses/17288/assignments/2313298?module_item_id=4864185
    9·1 answer
  • In a digit 13 ISBN number, can you think of errors that the check digit system cannot identify and give an example to explain wh
    5·1 answer
  • Does artificial intelligence have a place in our society why or why not
    5·2 answers
  • 50 POINTS<br><br>Question linked in file below.
    5·1 answer
  • If you type too much text on a PowerPoint slide, the additional text is added to a second slide.
    9·1 answer
  • Which of the following players is on offence
    9·1 answer
  • Some of the ways we can resolve IPv4 address shortage
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!