Write a program to compute factorial

Assignment Help Computer Engineering
Reference no: EM132208309

Write a program that ask user to enter a number (i.e. integer). It then checks whether the number is less than 10 or not.

If the number is less than 10, it computes factorial or else it computes the square.

The result of whatever operation is performed on the number needs to be displayed.

You need to display the user entered number as well. The program needs to contains 3 functions:

a. To compute factorial

b. To computer square

c. To display the results

Reference no: EM132208309

Questions Cloud

Why lung cancer cluster in a family for non-genetic reasons : One of the most devastating diseases in American communities today is lung cancer. Discuss why lung cancer might cluster in a family for non-genetic reasons
Encrypt the contents of the file and put the results : Write a program that allows users to encrypt files. We will implement two simple encryption methods.
Display the contents of the array and row by row : Write the program so that it asks the user for a dollar amount by which each price should be increased.
Write a program which ask the program user to enter grade : Write a program which ask the program user to enter grade for each IST class student and computer flowing.
Write a program to compute factorial : Write a program that ask user to enter a number (i.e. integer). It then checks whether the number is less than 10 or not.
Write a program that prints the related multiplication table : Write a program that asks the user to enter a number between 1 and 10 then prints the related multiplication table.
Name and describe the major structures of the middle ear : Neurological Structures and Functions Questions - Name and describe the major structures of the middle ear. What is the function of the somatosensory system
What are the categories of costs and benefits : From your perspective, what are the major costs and benefits of a proposed city ordinance that would require all bicycle riders to wear helmets?
Write a program that asks the user to enter a number : Write a program that asks the user to enter a number. Display the following pattern by writing lines of asterisks.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Use the int cast process to convert to an integer

give Output the corresponding letter grade along with the initial number entered in decimal format utilizing the printf method and format specifiers. Output the number in only 3 decimal places.

  Determining the closure under operation

Explain whether the following sets closed under following operations? Justify your answer. If a set is not closed under operation, what is its closure under the operation.

  Create a graph to graphically represent the information

Create a spreadsheet showing the results of 3 and 4 and create a graph to graphically represent the information.

  Find at least one example of a parameter less procedure

Find at least one example of a parameter less procedure that does not perform exactly the same computation every time it is called.

  Design of an operating system performance evaluation

The Design of an Operating System Performance Evaluation and Analysis - What is the significance of the topic as related to the field of computer science and industry?

  What are the advantages of using the abstraction

What details are abstracted away by programming-language variables? What are the advantages of using the abstraction? What are the disadvantages?

  Which system matters more disk latency or bandwidth

For transaction processing systems (lots of small reads and writes), which matters more - disk latency or bandwidth? Why?

  State two reasons for employing optical isolation

Describe briefly the purpose of the I/O section.

  What is the difference between composition and aggregation

What is the difference between composition and aggregation? Draw class diagram based on the code below. What is composition and what symbol is used to represent it?

  Evaluate a product expression

To evaluate a sum expression (series of zero or more additions and subtractions): evaluate a product expression (zero or more multiplications and divisions).

  Design a divide and conquer algorithm that randomly shuffles

Shuffling a linked list. Design a divide and conquer algorithm that randomly shuffles a linked list in O(nlog(n)) time and logarithmic extra space.

  Write a program that creates a polyline shape dynamically

Write a program that counts the number of times the mouse has been clicked. Display that number in the center of the window.

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