以“Iwanttobeanengineer”为题写一篇70词左右的短文!!!!!!

以“Iwanttobeanengineer”为题写一篇70词左右的短文!!!!!!,第1张

I want to be an engineer.Being an software engineer is my seeking for future career. For i feel that the potential applicaiton area of computer in future is limitless, it has brought and will bring more huge influence to our lives. It almost effects all sides of our lives. When the program your wrote runs and produces wonderful results, you'll find that you has made a great thing. In the other hand, many ancestors' dreams and even the things they didn't ever image have come true now. The development of the computer software has brought great convenience to our lives, when you see the programs your wrote have been used widely and given a huge change to people's lives, you'll find that what significative thing you've done for human. And this is my seeking and willing.

我想成为一名工程师。当一个软件工程师是我对未来事业的追求。因为我感到电脑的潜在的应用领域将是不可限量的,它对我们的生活已经产生了并将继续带来巨大的影响。它几乎影响我们生活的方方面面。当你看到自己编写的程序在电脑上运行并产生 了奇妙的结果的时候,你会感到自己做了一讲了不起的事情。另外,有许多古人的梦想甚至是故人们没有想到的事,现在已经变成了现实。电脑软件的开发极大的方便了我们的生活,当你看到自己编写的程序得到了广泛的应用,并且给人们的生活带来了巨大的改变你会发现你为人类做了一件多么有意义的事。这正是我的追求和理想所在。

public class Read {

    public static void main(String[] args) throws Exception {

        long size = readFileByChars("D://test.txt")

        write("D://test1.txt",size)

    }

    public static long readFileByChars(String fileName) {

        File file = new File(fileName)

        Reader reader = null

        int num =0

        try {

            reader = new InputStreamReader(new FileInputStream(file))

            int tempchar

            while ((tempchar = reader.read()) != -1) {

                // 对于windows下,rn这两个字符在一起时,表示一个换行。

                // 但如果这两个字符分开显示时,会换两次行。

                // 因此,屏蔽掉r,或者屏蔽n。否则,将会多出很多空行。

                if (((char) tempchar) != 'r') {

                    System.out.print((char) tempchar)

                }

                if (tempchar>= 'A' && tempchar<= 'Z' ||tempchar>= 'a' && tempchar<= 'z'){

                    num++

                }

            }

            reader.close()

        } catch (Exception e) {

            e.printStackTrace()

        } finally {

            if (reader != null) {

                try {

                    reader.close()

                } catch (IOException e1) {

                }

            }

        }

        return num

    }

    public static void write(String fileName,long size) throws IOException {

        File file = new File(fileName)

        Writer writer = null

        try {

            writer =new FileWriter(new File(fileName))

            writer.write("英文字母共有:"+size)

        }catch (Exception e){

            e.printStackTrace()

        }finally {

            if (writer!= null){

                writer.close()

            }

        }

    }

} 第二题:

public class Read {

    public static void main(String[] args) throws Exception {

       readFile("D://test.txt")

    }

    public static void readFile(String fileName ) throws Exception {

        BufferedReader isr = new BufferedReader(new FileReader(fileName))

        String str = null

        int allnumber =1

        str = isr.readLine()

        String [] strings = str.split("\\s+")

        float [] sum ={Float.valueOf(strings[0]),Float.valueOf(strings[1]),Float.valueOf(strings[2])}

        float [] min ={Float.valueOf(strings[0]),Float.valueOf(strings[1]),Float.valueOf(strings[2])}

        float [] max ={Float.valueOf(strings[0]),Float.valueOf(strings[1]),Float.valueOf(strings[2])}

        System.out.println(str)

        while ((str = isr.readLine())!= null){

            System.out.println(str)

            deal(str,sum,min,max)

            allnumber++

        }

        if (isr!= null){

            isr.close()

        }

        System.out.println("三门课最大值:"+max[0]+"\t"+max[1]+"\t"+max[2])

        System.out.println("三门课最小值:"+min[0]+"\t"+min[1]+"\t"+min[2])

        System.out.println("三门课平均值:"+sum[0]/allnumber+"\t"+sum[1]/allnumber+"\t"+sum[2]/allnumber)

    }

    public static void deal(String str, float[] sum, float[] min, float[] max){

        String [] strings = str.split("\\s+")

        for (int i=0i<3i++) {

            sum[i] = sum[i] + Float.valueOf(strings[i])

            if (max[i] < Float.valueOf(strings[i])) {

                max[i] = Float.valueOf(strings[i])

            }

            if (min[i] > Float.valueOf(strings[i])) {

                min[i] = Float.valueOf(strings[i])

            }

        }

    }

}


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/7921502.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-11
下一篇 2023-04-11

发表评论

登录后才能评论

评论列表(0条)

保存