From 692b0fc575be4d41c22a60c1f6c2eba32c4084d5 Mon Sep 17 00:00:00 2001 From: Ozhao <2577760571@qq.com> Date: Thu, 6 Aug 2020 21:35:49 +0800 Subject: [PATCH] zhishu --- Mys.txt | 28 ++++++---------------------- miyunsuan.txt | 26 -------------------------- 2 files changed, 6 insertions(+), 48 deletions(-) delete mode 100644 miyunsuan.txt diff --git a/Mys.txt b/Mys.txt index e738da3..ffa8bb4 100644 --- a/Mys.txt +++ b/Mys.txt @@ -1,25 +1,9 @@ -import java.util.Scanner; +public class zhishu { -public class duishu { - public static void main(String args[]) { - double x,k=1,f=1,e,n,a=0; - Scanner sc = new Scanner(System.in); - x=sc.nextDouble(); - n=sc.nextDouble(); - if(n < 0) - System.out.println("error"); - else - { - for(int i = 1;i <= n;i++) - { - - a =Math.pow((double)x,(double)i); - k = k*i; - e = a/k; - f += e; - } - System.out.println((double)f); - } + public double zhishu(double a) { + return Math.pow(Math.E,a); + } + -} +} \ No newline at end of file diff --git a/miyunsuan.txt b/miyunsuan.txt deleted file mode 100644 index c3e10ba..0000000 --- a/miyunsuan.txt +++ /dev/null @@ -1,26 +0,0 @@ -import java.util.Scanner; - -public class duishu { - public static void main(String args[]) { - double x,k=1,f=1,e,n,a=0; - Scanner sc = new Scanner(System.in); - x=sc.nextDouble(); - n=sc.nextDouble(); - if(n < 0) - System.out.println("error"); - else - { - for(int i = 1;i <= n;i++) - { - - a =Math.pow((double)x,(double)i); - k = k*i; - e = a/k; - f += e; - } - System.out.println((double)f); - } - } - -} -