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
Full from of tmc computer
Butoxors [25]

Answer:

Traffic Message Channel,

7 0
3 years ago
Read 2 more answers
E-commerce transactions that are executed using wireless mobile devices are known as
LUCKY_DIMON [66]

Answer:

Answer is Mobile commerce

4 0
3 years ago
Protocols used in each layers in each osi reference model
natka813 [3]

The protocols  that are often used in each layers in each OSI reference model are:

Layers                           Protocols

Layer 7- Application          SMTP, HTTP, FTP, POP3, SNMP

Layer 6- Presentation           MPEG, ASCH, SSL, TLS

Layer 5-Session                   NetBIOS, SAP

Layer 4-Transport                      TCP, UDP

Layer 3-Network                IPV5, IPV6, ICMP, IPSEC, ARP, MPLS.

Layer 2-Data Link       RAPA, PPP, Frame Relay, ATM, Fiber Cable.

Layer 1-Physical              RS232, 100BaseTX, ISDN, 11.

<h3>What is OSI Model?</h3>

The OSI Model is known to be a kind of a logical and conceptual framework that tells all about network communication that is often used by systems in an open to interconnection and also in any communication with other forms of systems.

Note that the Open System Interconnection (OSI Model) is one that tells more about a logical network and it is one that also tells about computer packet transfer via the use of various layers of protocols.

Therefore, The protocols  that are often used in each layers in each OSI reference model are:

Layers                           Protocols

Layer 7- Application          SMTP, HTTP, FTP, POP3, SNMP

Layer 6- Presentation            MPEG, ASCH, SSL, TLS

Layer 5-Session                   NetBIOS, SAP

Layer 4-Transport                      TCP, UDP

Layer 3-Network                IPV5, IPV6, ICMP, IPSEC, ARP, MPLS.

Layer 2-Data Link       RAPA, PPP, Frame Relay, ATM, Fiber Cable.

Layer 1-Physical              RS232, 100BaseTX, ISDN, 11.

Learn more about OSI reference model  from

brainly.com/question/12976859

#SPJ1

8 0
2 years ago
An organization is using Amazon CloudWatch Logs with agents deployed on its Linux Amazon EC2 instances.
Dahasolnce [82]

Answer:

A and B

Explanation:

EC2 run command gives a management output to review various instances and servers. Here, the logging files, collecting metrics and patches, running script installations can be achieved.

Verify the user permission and the run command, confirms if whether or not the problem of missing logging files is from the settings.

There are several AWS and customer managed policies for cloudwatch logs to give users certain levels for permission. Verifying this determines if there is full access, group logs and creation of group log events, or even a read only access.

3 0
4 years ago
Edhesive 4.3 code practice question 2
Arturiano [62]
Sos shacahacwhaveusbsusvs js

8 0
3 years ago
Other questions:
  • If you press the tab key when you're in in the last cell of a table,
    10·1 answer
  • Robert needs to apply formatting from one set of text to multiple other sets of text throughout the document. Which option shoul
    7·1 answer
  • Insert a function in cell g5 to calculate the first student's monthly payment, using appropriate relative and absolute cell refe
    13·1 answer
  • A company has recently learned of a person trying to obtain personal information of employees illegally. According to which act
    15·2 answers
  • If a form-based code is administered, then what does the administration section of the code specifically set forth?
    6·1 answer
  • when a user has the requirement to stay connected 100% of the time as they move throughout the WLAN coverage area, what are they
    13·1 answer
  • The incompatibilities in speed between the various devices and the CPU make I/O synchronization difficult, especially if there a
    6·1 answer
  • List at least 5 professions for people working in the Information/Communication<br> fields.
    10·1 answer
  • Question 4
    5·1 answer
  • Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!