![fri90](/avatars/19711.jpg)
fri90
28.08.2020 •
Computers and Technology
Write an application that displays the factorial for every integer value from 1 to 10. A factorial of a number is the product of that number multiplied by each positive integer lower than it. For example, 4 factorial is 4 * 3 * 2 * 1, or 24. The output would then be The factorial of 4 is 24.
Solved
Show answers
More tips
- S Style and Beauty How to Properly Apply Eye Makeup: Tips from a Professional Makeup Artist...
- A Animals and plants How ants survive winter: exploring the secrets of their winter life...
- F Food and Cooking Discover How to Properly Prepare Dough for Rasstegai...
- P Philosophy Unidentified Flying Object - What is the Nature of this Phenomenon?...
- F Family and Home Protect Your Home or Apartment from Pesky Ants...
- O Other What is a Disk Emulsifier and How Does it Work?...
- F Family and Home What does a newborn need?...
- F Family and Home Choosing the Right Car Seat for Your Child: Tips and Recommendations...
- F Food and Cooking How to Get Reconfirmation of Registration?...
- C Computers and Internet How to Get Rid of Spam in ICQ?...
Answers on questions: Computers and Technology
- C Computers and Technology g Consider the turning point problem again, but this time you are given a sequence of at least three integers, which consists of a decreasing subsequence followed by an increasing...
- M Mathematics How to find quadratic model? I am learning on quadratic models and the school video example is (2,10),(10,12), and (4,12) for the quadratic equation y=ax^2+bx+c which simplifies...
- E English Read this excerpt from Shakespeare...
- M Mathematics What’s the answer???...
- E English write paragraph of about 120 words describing a couple of cultural valves you are proud of or you up hold and explain their Importance to society...
- M Mathematics P (x)=3x+4, q (x)=2xsquared,find p (q (x))...
- G Geography Why are heavy industry is generally set up near railway stations or navigable rivers...
- G Geography 3. Explicati prin doua argumente, care dintre instrumentele geografice sunt mai utile in deplasarea: a. prin oras b. pe un traseu montan ‼️‼️REPDE va roggg‼️‼️...
- H Health How do intranasal steroids work? They deactivate the mast cells and basophils. They block the H1 receptors on the mast cells and basophils. They activate the H2 receptors on the...
- M Mathematics Sum to n terms series 2.3+3.4+4.5+…...
Ответ:
Following are the code to this question:
public class fact//defining class fact
{
public static void main(String[] ax) //defining main method
{
int x,f=1;//defining integer variable
System.out.println("Followig are the factorial from 1 to 10: "); //print message
for(x=1;x<=10;x++)//defining for loop to print factorial from 1 to 10
{
f = f*x;//calculating factorial and store value in f variable
System.out.println("Factorial of "+ x+" is: " +f);//print values
}
}
}
Output:
please find the attached file.
Explanation:
In the above-given java program, a class "fact" is defined, inside the class main method is declared, in which two integer variable "x and f" is declared, in which the variable "f" holds an integer value that is "1".
In the next step, a for loop is declared, that uses the variable x to calculate the factorial from 1 to 10, and stores it value in f variable, in this loop a print method is used that prints its factorial value.
Ответ:
so sorry
Explanation:
i dont now please