The factorial of a nonnegative integer n is written n!
(pronounced “n factorial”) and is defined as
follows:
n! = n · (n - 1) · (n - 2) · … · 1 (for values of n greater
than to 1)
and
n! = 1 (for n = 0 or n = 1).
For example, 5! = 5 · 4 · 3 · 2 · 1, which is 120. Use while
structures in each of the following:
a) Write a program that reads a nonnegative integer and
computes and prints its factorial. Use the
following function prototype to calculate factorial:
int myFactorial(int n);
b) Write a program that estimates the value of the
mathematical constant e by using the formula:
Use the following function prototype to calculate e:
double myE( );
Hint: Use an accuracy of 10 terms.
c) Write a program that computes the value of ex by using
the formula
Use the following function prototype to calculate e:
double myEx(int x);
Answer Posted / wew
The factorial of a nonnegative integer n is written n!
(pronounced �n factorial�) and is defined as
follows:
n! = n · (n - 1) · (n - 2) · � · 1 (for values of n greater
than to 1)
and
n! = 1 (for n = 0 or n = 1).
For example, 5! = 5 · 4 · 3 · 2 · 1, which is 120. Use while
structures in each of the following:
a) Write a program that reads a nonnegative integer and
computes and prints its factorial. Use the
following function prototype to calculate factorial:
int myFactorial(int n);
b) Write a program that estimates the value of the
mathematical constant e by using the formula:
Use the following function prototype to calculate e:
double myE( );
Hint: Use an accuracy of 10 terms.
c) Write a program that computes the value of ex by using
the formula
Use the following function prototype to calculate e:
double myEx(int x);
| Is This Answer Correct ? | 14 Yes | 16 No |
Post New Answer View All Answers
Reverse the link list without creating new list ?
where is the first vidhyalaya of physically handicaped
What is VAT Account determination ? and how we can map in SAP ?
Is there aptitute question will be asked in NIC exam ??? If yes how many questions will be asked??
The old welding machine use electro- -magnetic winding to step up the current for welding rods,what is new principle inside the welding
what is the definition(body) of a default constructor in c++?
I want to test the applications installed on the client machine using the QTP installed on the server machine.But the requirement is like that client machines do not have there own CPU's they are just dummy workstations on which the applications are excesible.So where all places QTP should be insalled in theis client server architecture.How many licenses required of what type.Please explain in details .Its urgent. Thanks
consiteunts of indian railways
Differentiate y = sinx + cosx + tanx
I have cleared SBT clerk exam and having interview on 29.I have completed my B.tech in IT.I would like to know the types of questions asked in the interview.
What would be your first invention?
15. What is your Future Plans for the Company if Permanently Employed?
please answer the following question: A table contains the monthly sales data for the 12 months of a year and for the 4 sales zones where each zone has 8 districts.The table is defined in WORKING-STORAGE SECTION.What is the size of the defined table in number of bytes? write statements to calculate the total sales for each month.
Question 1 A low-level format received by a floppy disk does what? a. Adds a root directory b. Includes a FAT (File Allocation Table) c. Stores 720K d. Creates a structure of sectors, tracks, & cluster. Question 2 A user is complaining of problems. You find that upon startup, the IBM machine give two beeps alerting you to a POST error. Error code 301 shows. What is wrong with this machine? a. There is a monitor error. b. There is a keyboard error. c. This is not a POST error. Two beeps indicates a motherboard error. d. There is a serial card error. Question 3 What is this an example of? A. A 30-pin SIMM B. A 72-pin SIMM C. A 168-pin DIMM D. C-RIMM Question 4 Bridges are capable of which? a. Expanding the length of a network segment. b. Acting as a firewall. c. Segmenting networks. d. Communication of computers on a LAN. Question 5 Which is true of a female DB 15-pin video port? a. It has 2 rows of 5 pinholes. b. It has 3 rows of 5 pinholes. c. It has one row of 8 pinholes and one row of 7 pinholes d. It has one row of 6 pinholes and one row of 9 pinholes Question 6 You have just installed two hard drives into the same machine. One is set up as the slave and both are on the same IDE channel. You notice that the drive's LED light is constantly lit on the slave drive. What do you need to do to fix this? a. Troubleshoot the slave drive by reconfiguring the slave to be the master, removing the original master drive, then rebooting. b. Disable the secondary controller in the BIOS. c. Manually enter the drive settings on the BIOS. d. Install more memory. Question 7 SVGA and Ultra VGA are two distinct video standards. True or False? a. True. b. False. Question 8 SVGA is represented by all of the following resolutions except: a. 1600 x 1200 b. 800 x 600 c. 640 x 480 d. 1280 x 1024 Question 9 Which is true of an Active Matrix LCD? a. The LCD is divided into two halves. b. The LCD is divided into two halves. c. Each pixel is constantly refreshed. d. The pixels are fixed. e. It uses more electricity. f. None of the above. Question 10 What are the correct stages and order of the EP laser printing process? a. Cleaning, Writing, Conditioning, Developing, Fusing, Transferring, and End of Cycle b. Cleaning, Conditioning, Writing, Developing, Transferring, Fusing, & End of Cycle c. Erasing, Writing, Heating, Developing, Fusing, Transferring, & End of Cycle d. Conditioning, Erasing, Writing, Developing, Fusing, Transferring, & End of Cycle Question 11 Choose the correct associations (pick 2). a. 802.4 – Internetworking b. 802.6 - Metropolitan area network c. 802.9 - Integrated voice and data networks d. 802. 11 - Token ring LAN Question 12 What is the function of a Layer 2 switch ? a. forwards data based on logical addressing b. duplicates the electrical signal of each frame to every port c. learns the port assigned to a host by examining the destination MAC address d. determines which interface is used to forward a frame based on the destination MAC address. Question 13 An administrator would like to connect ten workstations on a 192.168.0.0/24 network. The device selected by the administrator must allow connectivity between hosts without sharing bandwidth. Which device would be appropriate? a. Hub b. Router c. Switch d. Repeater Question 14 Which devices are primarily used to extend cable segments within a collision domain by regenerating the data signals? (Choose two.) a. switch b. repeater c. router d. bridge e. hub Question 15 Which networking devices use the MAC address to make forwarding decisions? (Choose two.) a. NIC b. bridge c. hub d. switch e. repeater Software : 1. Briefly describe the data type conversion feature of Oracle SQL and PL/SQL. 2. What is INDEX? Describe its benefits. 3. Write down the name of five most popular RDBMS. 4. What is UML? Write some Diagram name. 5. What is HTML and XML? 6. What is CSS and AJAX and their benefits? 7. What is software quality assurance? 8. Describe components of a typical test plan? 9. What is the difference between QC and QA? 10. What is Verification and Validation? 11. What diff b/w black box and white box testing? 12. What is the difference between System Testing, Integration Testing & System Integration Testing? ATI Limited Question Paper Duration Time : 1 Hour and 30 Minutes Question 1 A low-level format received by a floppy disk does what? a. Adds a root directory b. Includes a FAT (File Allocation Table) c. Stores 720K d. Creates a structure of sectors, tracks, & cluster. Question 2 A user is complaining of problems. You find that upon startup, the IBM machine give two beeps alerting you to a POST error. Error code 301 shows. What is wrong with this machine? a. There is a monitor error. b. There is a keyboard error. c. This is not a POST error. Two beeps indicates a motherboard error. d. There is a serial card error. Question 3 What is this an example of? A. A 30-pin SIMM B. A 72-pin SIMM C. A 168-pin DIMM D. C-RIMM Question 4 Bridges are capable of which? a. Expanding the length of a network segment. b. Acting as a firewall. c. Segmenting networks. d. Communication of computers on a LAN. Question 5 Which is true of a female DB 15-pin video port? a. It has 2 rows of 5 pinholes. b. It has 3 rows of 5 pinholes. c. It has one row of 8 pinholes and one row of 7 pinholes d. It has one row of 6 pinholes and one row of 9 pinholes Question 6 You have just installed two hard drives into the same machine. One is set up as the slave and both are on the same IDE channel. You notice that the drive's LED light is constantly lit on the slave drive. What do you need to do to fix this? a. Troubleshoot the slave drive by reconfiguring the slave to be the master, removing the original master drive, then rebooting. b. Disable the secondary controller in the BIOS. c. Manually enter the drive settings on the BIOS. d. Install more memory. Question 7 SVGA and Ultra VGA are two distinct video standards. True or False? a. True. b. False. Question 8 SVGA is represented by all of the following resolutions except: a. 1600 x 1200 b. 800 x 600 c. 640 x 480 d. 1280 x 1024 Question 9 Which is true of an Active Matrix LCD? a. The LCD is divided into two halves. b. The LCD is divided into two halves. c. Each pixel is constantly refreshed. d. The pixels are fixed. e. It uses more electricity. f. None of the above. Question 10 What are the correct stages and order of the EP laser printing process? a. Cleaning, Writing, Conditioning, Developing, Fusing, Transferring, and End of Cycle b. Cleaning, Conditioning, Writing, Developing, Transferring, Fusing, & End of Cycle c. Erasing, Writing, Heating, Developing, Fusing, Transferring, & End of Cycle d. Conditioning, Erasing, Writing, Developing, Fusing, Transferring, & End of Cycle Question 11 Choose the correct associations (pick 2). a. 802.4 – Internetworking b. 802.6 - Metropolitan area network c. 802.9 - Integrated voice and data networks d. 802. 11 - Token ring LAN Question 12 What is the function of a Layer 2 switch ? a. forwards data based on logical addressing b. duplicates the electrical signal of each frame to every port c. learns the port assigned to a host by examining the destination MAC address d. determines which interface is used to forward a frame based on the destination MAC address. Question 13 An administrator would like to connect ten workstations on a 192.168.0.0/24 network. The device selected by the administrator must allow connectivity between hosts without sharing bandwidth. Which device would be appropriate? a. Hub b. Router c. Switch d. Repeater Question 14 Which devices are primarily used to extend cable segments within a collision domain by regenerating the data signals? (Choose two.) a. switch b. repeater c. router d. bridge e. hub Question 15 Which networking devices use the MAC address to make forwarding decisions? (Choose two.) a. NIC b. bridge c. hub d. switch e. repeater Software : 1. Briefly describe the data type conversion feature of Oracle SQL and PL/SQL. 2. What is INDEX? Describe its benefits. 3. Write down the name of five most popular RDBMS. 4. What is UML? Write some Diagram name. 5. What is HTML and XML? 6. What is CSS and AJAX and their benefits? 7. What is software quality assurance? 8. Describe components of a typical test plan? 9. What is the difference between QC and QA? 10. What is Verification and Validation? 11. What diff b/w black box and white box testing? 12. What is the difference between System Testing, Integration Testing & System Integration Testing?
how to store the vacuum in tank? its possible? what are the units for measure the vacuum ?