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
Rashid [163]
3 years ago
10

Write a while loop that will figure out the factorial of 5 (5!) and print this. It should use two integer variables (i and f) an

d print f at the end:
Computers and Technology
1 answer:
Hoochie [10]3 years ago
7 0

<u>Answer:</u>

<em>void main() </em>

<em>{ </em>

<em>int n, i, fact=1; </em>

<em>printf(""Enter the number\n""); </em>

<em>scanf(""%d"",&n); </em>

<em>i=num </em>

<em>while(i>=1) </em>

<em>{ </em>

<em>fact=fact * i; </em>

<em>i--; </em>

<em>} </em>

<em>printf(""The factorial of given number %d is %d\n"", n, fact); </em>

<em>return 0; </em>

<em>} </em>

<u>Explanation:</u>

This program obtains the number for which the factorial has to be found.

Then run a for loop till the factor of 1 is calculated and inside the for loop the number is multiplied with <em>other numbers in the descending order and finally result is printed. </em>

You might be interested in
Which column and row references are updated when you copy the formula f$3/15
Tasya [4]

Answer: Column F

Explanation: In Microsoft excel, for the sake of robustness and to aid the effectiveness of updating formulas across cells. The reference of cells are treated as relative which means that when formulas are copied across columns or within rows, they get updated automatically. However, some numbers may be treated as constants such that we do not want them to change or be updated as we move acisss cells. Thus, such numbers are treated Given absolute references, which is made possible by adding a '$' prefix before the colum alphabet or row number or both. in the scenario given above, the row has the $ prefix, hence, it is absolute and will not change but the column alphabet does not and hence, treated as relative.

3 0
3 years ago
A research study does not need to be well designed to be effective.<br> False<br> O True
Sedbober [7]
Answer:

true

Remember to drink water!!
7 0
3 years ago
Create a scenario of a hypothetical company that needs an information system. This scenario should include the following informa
Effectus [21]

A  hypothetical company that needs an information system is Memphis drilling and construction company.

<h3>What is the size of a project?</h3>

This is known to be the  the number of firms taking part in the project and thus in the case above, it is small project.

In terms of Staff/experts availability, there are experts from the mining industry with years of experience, soil survey analyst as well as other minor staff.

In terms of System level of criticality, it is big because the extent to drilling will make use of the information system and other major decisions made.

Learn more about  information system from

brainly.com/question/14688347

#SPJ1

6 0
2 years ago
What are the two main factors in the mantle that contribute to the rock cycle?
meriva
Pressure and heat I believe is the answer not sure
8 0
3 years ago
Read 2 more answers
Identify the following keys. write AK for Alphanumeric keypad,NK for Numeric Keypad,CK for Cursor Key, FK for Function keys and
natali 33 [55]

Answer:need points for stuff

Explanation:

4 0
3 years ago
Other questions:
  • How to ask for a letter of recommendation via email?
    10·1 answer
  • What is a detailed and thorough review of the deployed security infrastructure compared with the organization’s security policy
    5·1 answer
  • A SmartArt graphic consists of two parts: the SmartArt graphic itself and a(n) ____ pane.
    5·1 answer
  • Drivers are concerned with the mileage obtained by their automobiles. One driver has kept track of several tankfuls of gasoline
    10·1 answer
  • Create a dynamic array of 100 integer values named myNums. Use a pointer variable (like ptr) which points to this array. Use thi
    6·1 answer
  • I have no idea how to use the sep and end in Python can someone help me I have a test tomorrow
    13·1 answer
  • How many Horizontal and Vertical Rods are there in Abacus
    15·2 answers
  • How do i automate survey monkey results to my email
    11·1 answer
  • Consider the given choices and determine which one establishes a conceptual framework for network connectivity.
    5·1 answer
  • What is the decimal form of the following binary ip address? 11001101.00111001.10101001.01000010
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!