Program to perform the different arithmetic operations

Assignment Help Computer Engineering
Reference no: EM1321856

Write down a Ruby program that continuously reads in the number, x, from the screen, and then computes and displays its:

i) Factorial, if x is less than 15;

ii) Fourth power, if 15 < x ≤ 35 and

iii) Square, if x > 35.

Your program must run till the user wishes to stop running it. In other words, after processing first number, it must ask the user if he or she wishes to continue. If the answer is no the program terminates; if answer is yes it reads in another number, processes it and asks user again till the user replies no.

Reference no: EM1321856

Questions Cloud

Confidence interval for population mean : Confidence interval for Population mean
Sample size assessment by standard deviation-margin of error : How many departments would they need to survey to achieve this level of accuracy with 95% confidence?
Make a recommendation to your neighbor : make a recommendation to your neighbor based on convincing economic analysis.
Use of quoted material : Additionally discuss the use of quoted material and how the citations for quoted material differ from the citations for paraphrased material.
Program to perform the different arithmetic operations : Write down a Ruby program that continuously reads in the number, x, from the screen, and then computes and displays its: Factorial, if x is less than 15; Fourth power, if 15 35.
Anticipated capacity factor selling power will not escalate : The anticipated capacity factor is 70 percent also the price for selling power will not escalate. The operational life of the plant is 40 years also the salvage value negligible.
Explaining chi-square goodness-of-fit test : In chi-square goodness-of-fit test when there is close agreement between observed frequency and expected frequency, chi-square test value will be small.
Five dimensions of business environment : Select a company or organization with which you are familiar and determine which of the five dimensions of the business environment has the biggest impact (either positive or negative) on that company/organization.
Sample to achieve this level of accuracy and confidence : How many individuals will it need to sample to achieve this level of accuracy and confidence?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Aspects of effectiveness and robustness in software

Aspects of effectiveness and robustness in software

  Comparing the product attributes of companies

Compare and contrast their product attributes in order to understand whether the offerings are becoming differentiated or more alike as a result.

  Project management tasks

Explain how the systems analyst may help along with the project management tasks. Also, explain how a new employee can contribute to the tasks.

  Why are most photographic images stored in a lossy format

Why are most photographic images stored in a lossy format

  Discuss and describe the potential security threats

Discuss and describe the potential security threats

  Program in visual basic to calculate area of a triangle

Write down a program in the visual basic which determines the area of a triangle. If three sides a, b and c entered do not make a triangle transmit the message out to the screen that the data entered was invalid.

  Security accounts manager

The security accounts manager (SAM) database consists of the information on all user profiles. User account set-up populates the database. Explain the fields and options linked with user account set-up.

  Challenges of internet search

State different challenges of relying over the Internet for your research?In extending a single-system mail system to distributed mail system, state the key additions which should be involved? Discuss in scholarly detail.

  Verilog system

Develop a verilog system which utilizes a block code for the error management. The system must accept a 15-word block of 8-bit data words one word at a time.

  Description of problems and business impacts

Description of problems and business impacts

  How to run and modify marie program

How to run and modify marie program Include a decision before storing and outputing result. If  value of the result is not positive (so zero or negative), set  Result value to the value ZERO (0)

  What are the types of malicious attack

What are the types of malicious attack

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd