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
Arturiano [62]
3 years ago
15

The value of the mathematical constant e can be expressed as an infinite series: e=1+1/1!+1/2!+1/3!+... Write a program that app

roximates e by computing the value of 1+1/1!+1/2!+1/3!+...+1/n! where n is an integer entered by the user.
Computers and Technology
1 answer:
LUCKY_DIMON [66]3 years ago
6 0

Answer:

// here is code in c++ to find the approx value of "e".

#include <bits/stdc++.h>

using namespace std;

// function to find factorial of a number

double fact(int n){

double f =1.0;

// if n=0 then return 1

if(n==0)

return 1;

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

       f = f *a;

// return the factorial of number

return f;

}

// driver function

int main()

{

// variable

int n;

double sum=0;

cout<<"enter n:";

// read the value of n

cin>>n;

// Calculate the sum of the series

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

  {

     sum += 1.0/fact(x);

  }

  // print the approx value of "e"

    cout<<"Approx Value of e is: "<<sum<<endl;

return 0;

}

Explanation:

Read the value of "n" from user. Declare and initialize variable "sum" to store the sum of series.Create a function to Calculate the factorial of a given number. Calculate the sum of all the term of the series 1+1/1!+1/2!.....+1/n!.This will be the approx value of "e".

Output:

enter n:12

Approx Value of e is: 2.71828

You might be interested in
What can a human till do better and fater than any Machine Learning (ML) olution?
Gemiola [76]

Judge the quality of any given data can a human till do better and fater than any Machine Learning (ML).

<h3>What is Machine Learning (ML)?</h3>
  • Switch between fields of expertise. a thorough understanding of the facts' meaning. Check the veracity of any information that is provided.
  • According to some scientists, AI will replace jobs with a single output. A mental task may also be mechanized in the future if it can be finished by a person in less than a second.
  • Expressing empathy, making others feel good, taking care of others, expressing feelings and vulnerability in a sympathetic way, and making people laugh are all examples of being creative and artistic for the purpose of being creative. The personal touch is important in most occupations and, in certain cases, it completes the task entirely.
  • Machines can perform as well as or better than humans in some tasks, despite their slower rate of development.

To learn more about Machine Learning (ML) refert to:

brainly.com/question/25523571

#SPJ4

5 0
1 year ago
It is illegal to have __________ emergency lights on your vehicle.
Alexxx [7]

Answer is A. Red and Blue

This because these are the same color of emergency lights that are used on Emergency vehicles like ambulances, police cars, fire trucks, etc. We wouldn't want normal citizens confusing drivers with police officers in case of an actual emergency.

8 0
3 years ago
Read 2 more answers
What is the critical path?
Natali [406]

Answer:

Option C. The path from start to finish that passes through all the tasks that are critical to completing the project in the shortest amount of time

is the correct answer.

Explanation:

  • Critical path is the term used in Project management.
  • It can be known by determining the longest stretch for dependent activities and the time required for them to complete.
  • A method known as "critical path method" is used for Project modelling.
  • All types of projects including aerospace, software projects, engineering or plant maintenance need Critical method analysis for the modeling of project and estimation.

I hope it will help you!

3 0
3 years ago
Give the appropriate term for each of the following.1. An easy-to-remember address for calling a web page (like www.code.org). 2
Nimfa-mama [501]

Answer:

1. URL (Universal Resource Locator)

2. DNS (Domain Name System)

3. Network

4. Packets

5. The Internet Engineering Task Force (IETF)

6. Bit

7. HTTP (Hypertext Transfer Protocol)

8. Protocol

Explanation:

1. "URL is the address of a World Wide Web page."

2. "DNS: The service that translates URLs to IP addresses. IP Address: A number assigned to any item that is connected to the Internet."

3. "A network is defined as a group of two or more computer systems linked together."

4. "In Information technology, a packet is collection of data that can be used by computers which need to communicate with each other, usually as part of a network."

5. "The Internet Engineering Task Force is an open standards organization, which develops and promotes voluntary Internet standards, in particular the standards that comprise the Internet protocol suite."

6. "A bit (short for binary digit) is the smallest unit of data in a computer. A bit has a single binary value, either 0 or 1"

7. "Hypertext Transfer Protocol provides a network protocol standard that web browsers and servers use to communicate."

8. "A network protocol defines rules and conventions for communication between network devices. Network protocols include mechanisms for devices to identify and make connections with each other, as well as formatting rules that specify how data is packaged into sent and received messages."

Hope this helps! <3

4 0
3 years ago
Adding Objects in Outlook
skelet666 [1.2K]

Answer:

I know its kinda late, but the answer is (B. Insert) on edg 2021.

Explanation:

5 0
3 years ago
Other questions:
  • Which of the following actions should you take when turning left at an intersection?
    11·1 answer
  • Describe how the Internet Protocol (IP) allows devices to easily connect and communicate on the Internet.
    12·2 answers
  • What are the pros and cons of the internet’s ability to access information
    8·2 answers
  • 1st row has 3 possible answers software program, web page, and web browser
    8·1 answer
  • How are XY coordinates utilized in construct ?
    15·1 answer
  • A ___________ variable is used to add up a set of values. fill in the blank
    8·1 answer
  • Free pass if you want it.
    12·2 answers
  • Who knows my sister better?
    15·2 answers
  • Which statement best describes a social impact of computing on the world?
    9·1 answer
  • what component of virtualization controls all physical memory, and thus has the ability to make any unused memory pages in each
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!