"Boulevard to Jane" The first chapter of the book, Java Pseudo-code form

Source: Internet
Author: User

Import java. Boulevard to Jane. *;

Import java.io.*;

Import.java. Yugong Yishan. *;

public class Yugongyishan

{

public static void Main (String [] args) throws IOException

{

int foolish public;

descendants of int;

int mountain = 1;

while (mountain ==1&& Mountain does not increase)

{

If (a Foolish man dies)

{If there is a child to carry out the task of the mountain, the project will surely come true;}

Else

The project is bound to come true if the foolish male himself completes the task of moving Mountains;

while (descendants exist)

{

Son and grandchildren, sun and son; Posterity, infinite chamber also;

Biliping Insurance, referring to the south of the south, up to Hanyin;

Why not be so unfair;

This project is bound to come true;

}

}

}

}

2000 years ago, the Fool is an excellent engineer, in Yugong Yishan This fable shows the programming of the fine meaning. First, the original requirements are identified, then the basic way of communication, then the project objectives are determined, and a methodical and achievable technical solution is determined through the discussion. In the folly and the "Meander wise old man" in the exchanges, we can see the idea of programming, respectively, embodies the precise meaning of programming: branching, sequential cycle.

Import java.io.*;

public class Zhezhong

{

public static void Main (string[] args) throws IOException

{

int person;

if (people!) = Congenital retarded | | People! = the day after the lazy) people can learn to write programs;

String Wendu;

While (people have been alive, day after day)

{

If (wendu== day cold) {wash first after dressing;}

if (wendu== day heat) {First Wash and then dress;}

If (People get sick | | Cannot act | | Unexpected emergency) {The same day can be skipped above;}

}

}

}

This is the second part of the first chapter, the question of whether to compile the procedure. According to the author can write, this problem is written in the pseudo-code shown above.

Import java.io.*;

public class Chengxvdengyushenme

{

public static void Main (string[] args) throws IOException

{

int person;

if (Received Task)

{

Analyze the task, then take the programming thought, step by step to achieve

}

If (a task is coding) is usually the most overtime programmer;

SYSTEM.OUT.PRINTLN (+ "active and diligent thinking takes time");

SYSTEM.OUT.PRINTLN (+ "program = algorithm + structure");

}

}

program = algorithm + structure. In short, people read the topic and then convert it to computer-literate language, so that the computer executes it.

Import java.io.*;

public class Yuyan

{

public static void Main (string[] args) throws IOException

{

int person;

If (familiar with a language)

{You will find that any language only likes to dislike the problem;}

If (will be a computer language)

{

If (learn a new language a little)

will be proficient in another new language;

}

}

}

Import java.io.*;

public class Nogongcheng

{

public static void Main (string[] args) throws IOException

{

int programmer;

If (the programmer mastered a language && understood the most common logic && procedures in the raw lake to think and learn some algorithms && based on previous experience, these algorithms run on some data structures)

{

We can see the programmer's program;

}

if (with engineering age)

There will be engineers;

Else

{

a Master of language;

Have a game master;

have algorithm master;

No master of Engineering;

}

}

}

Understanding programming ideas will find that programming is a labor force, indeed, as long as we can solve the problem of the computer to understand the language. And each language is interlinked, there is no simple and the south of the point. Self-thinking programming is a bit boring, but when we change the mindset to face programming, we will not find it boring, such as when we think of a good game in language, we will feel that programming is an interesting thing.

"Boulevard to Jane" The first chapter of the book, Java Pseudo-code form

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.