| |

VerySource

 Forgot password?
 Register
Search
View: 663|Reply: 0

Have the steps within 10

[Copy link]

2

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2021-7-8 23:10:36
| Show all posts |Read mode
Package com.tuxing;

Public class jiecheng {

Public static void main (string args []) {

                 //the first method
INT S = 0;
INT Q = 1;
For (INT i = 1; i <= 10; i ++) {
q = q * i; // The front Q is the step-by-step number of this number, the Q is the maximum multiplication of this step
S + = q; // to the current value
}
System.out.println ("1! +2! +3! +4! +5! +6! +7! +8! +9! +10! =" + S);

}
}
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list