herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
計算你的BMI
-
1. 利用遞迴input n算2^n 2. 用C算GCD(3333,456)
-
請用 C/C++/java寫一簡易程式
-
BMI (Body Mass Index)= 體重 (kg) / 身高 ^2(m 2 ) 在台灣,行政院衛生署乃根據其相關研究,於2002年4月公佈台灣成人肥胖標準: BMI<18.5 為過輕, 18.5≦BMI<24 為正常體重, 24≦BMI<27 為過重, BM...
-
需要練習的Java程式:
-
一、 試利用switch case由程式中直接輸入一個1~7 之間的整數day,代表星期一到星期日。若day 的值是1,則印出 "星期一",若day 的值是2,則印出 "星期二",若day 的值是7,則印出 "星期日",...
-
33, 45, 87, 99, 27 算平均
-
用 C/C++算上學期加權平均
45 則留言:
try webproxy
public class ex_01 { static double show(int n){ double p=1; for(int i=2;i<=n;i++) p=p*i; return p; } public static void main(String[] args) { int n=20; double sum=0; for(int i=0;i<=n;i++) sum+=1.0/show(i); System.out.println(sum); }}
public class ex1030 { static double show(int n){ double p=1; for(int i=2; i<=n; i++){ p=p*i; } return p; } public static void main(String[] args) { int n=20; double sum=0; for(int i=0; i<=n ;i++) sum+=1.0/show(i); System.out.println(sum); } }
public class ex1030 { static double show(int n){ double p=1; for(int i=2; i<=n; i++){ p=p*i; } return p; } public static void main(String[] args) { int n=20; double sum=0; for(int i=0; i<=n ; i++) sum+=1.0/show(i); System.out.println(sum); }
}
public class b1013300701 { static double factorial(int n){ double p=1; for(int i=2; i<=n; i++){ p=p*i; } return p; }
public static void main(String[] args) { double sum=0; int N=20; for(int i=0; i<=N ;i++){ sum+=1.0/factorial(i); } System.out.println(sum); }
}
public class exx1 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0; i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
public class jimmy111 {
static double factorial (int n){
double p=1;
for(int i=2;i<n;i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
int n=22;
System.out.println(factorial(12));
}
}
public class jimmy111 { static double factorial (int n){ double p=1; for(int i=2;i<n;i++){ p=p*i; } return p; }
public static void main(String[] args) { int n=22; System.out.println(factorial(12)); }}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
public class A10433011 {
static double factorial(int n){
double p = 1;
for (int i=2;i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[]args){
double sum=0;
int n =20;
for(int i=0; i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
public class A10433043 {
static double show(int n){
double p=1;
for(int i=2;i<=n;i++)
p=p*i;
return p;
}
public static void main(String[] args) {
int n=20;
double sum=0;
for(int i=0;i<=n;i++)
sum+=1.0/show(i);
System.out.println(sum);
}
}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
A10433029
public class ex1041030 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
public class gg {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i
}
return p;
}
public static void main(String[] args) {
double sum=0
int n=20;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
}
System.out.print(sum);
}
}
public class A10433043 {
static double show(int n){
double p=1;
for(int i=2;i<=n;i++)
p=p*i;
return p;
}
public static void main(String[] args) {
int n=20;
double sum=0;
for(int i=0;i<=n;i++)
sum+=1.0/show(i);
System.out.println(sum);
}
}
A10433018
public class gg {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i
}
return p;
}
public static void main(String[] args) {
double sum=0
int n=20;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
}
System.out.print(sum);
}
}
public class A10433043 {
static double show(int n){
double p=1;
for(int i=2;i<=n;i++)
p=p*i;
return p;
}
public static void main(String[] args) {
int n=20;
double sum=0;
for(int i=0;i<=n;i++)
sum+=1.0/show(i);
System.out.println(sum);
}
}
public class A10433043 {
static double show(int n){
double p=1;
for(int i=2;i<=n;i++)
p=p*i;
return p;
}
public static void main(String[] args) {
int n=20;
double sum=0;
for(int i=0;i<=n;i++)
sum+=1.0/show(i);
System.out.println(sum);
}
}
A10433024
public class gg {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i
}
return p;
}
public static void main(String[] args) {
double sum=0
int n=20;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
}
System.out.print(sum);
}
}
A10433022
public class EX1 {
public static void main(String[] args) {
double p=1;
double sum=1;
int n=1000000;
for(int i=1; i<=n; i++){
p=i*p;
sum=sum+1.0/p;
}
System.out.println(sum);
}
}
import java.util.Scanner;
public class tast1 {
public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.print("輸入階層N"); int x=input.nextInt(); double p=1,sum=1; for(int i=1; i<=x ;i++){ p*=i; sum=sum+1/p; } System.out.println(sum); }}
a10433029
public class ex1041030 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
public class GG {
public static void main(String[] args) { double n=100000,p=1,i,a=1; for(i=1;i<=n;i++){ p=p*i; a=a+1.0/p;} System.out.println(a); }}
public class GG {
public static void main(String[] args) { double n=100000,p=1,i,a=1; for(i=1;i<=n;i++){ p=p*i; a=a+1.0/p;} System.out.println(a); }}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
import java.util.Scanner;public class zx { public static void main(String[] args) { int x; double d=1; double c =1 ; Scanner a = new Scanner(System.in); System.out.println("N="); x= a.nextInt(); for (int n=1;n<=x;n++){ c=n*c; d+=1.0/c;} System.out.println(d);}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
a10433029
public class ex1041030 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
public class hello123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0; i<=n ;i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
id="result-source" class="sh_html sh_sourceCode"><span class="sh_keyword"
public class jimmy111 { static double factorial (int n){ double p=1; for(int i=2;i<n;i++){ p=p*i; } return p; }
public static void main(String[] args) { int n=20; double sum=0; for(int i=0; i<=n; i++) sum+=1.0/factorial(i); System.out.println(sum); System.out.println(Math.E); }
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
public class cgvcb {
public static void main(String[] args) {
double p=1;
double sum=1;
int n=100;
for (int i=1; i<=n; i++){
p=i*p;
sum=sum+1.0/p;
}
System.out.println(sum);
}
}
A10433018
public class gg {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i
}
return p;
}
public static void main(String[] args) {
double sum=0
int n=20;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
}
System.out.print(sum);
}
}
public class ex1041030 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
}
A10433024
public class gg {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i
}
return p;
}
public static void main(String[] args) {
double sum=0
int n=20;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
}
System.out.print(sum);
}
}
public class cgvcb {
public static void main(String[] args) {
double p=1;
double sum=1;
int n=100;
for (int i=1; i<=n; i++){
p=i*p;
sum=sum+1.0/p;
}
System.out.println(sum);
}
}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
package hello;
public class EX1 {
static double factorial(int n){
double p=1;
for (int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
long n=20;
double sum=1;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
}
package hello;
public class EX1 {
static double factorial(int n){
double p=1;
for (int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
long n=20;
double sum=1;
for(int i=1; i<=n; i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
}
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
B10133189
public class He123 {
static double factorial(int n){
double p=1;
for(int i=2; i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[] args) {
double sum=0;
int n=20;
for(int i=0;i<=n ;i++)
sum+=1.0/factorial(i);
System.out.println(sum);
}
public class A10433022 {
static double factorial(int n){
double p = 1;
for (int i=2;i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[]args){
double sum=0;
int n =20;
for(int i=0; i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
static double factorial(int n){
double p = 1;
for (int i=2;i<=n; i++){
p=p*i;
}
return p;
}
public static void main(String[]args){
double sum=0;
int n =20;
for(int i=0; i<=n; i++){
sum+=1.0/factorial(i);
}
System.out.println(sum);
}
張貼留言