大道至簡第一章讀後感(java虛擬碼)

來源:互聯網
上載者:User

標籤:int   沒有   break   []   class   else   amp   while   指正   

大道至簡第一章用Java虛擬碼編寫
第一次寫,難免有錯誤,歡迎指正和指導

//1 愚公移山
public class yishan{
public static void main(String[]args){
while(山還在)
{
扣石墾壤,箕畚運於渤海之尾;
if(愚公死&&子孫存在)
愚公=愚公兒子; //有子複焉,子又生孫,孫又生子
else if(愚公死&&無子孫)//考慮沒有子孫的情況
break;


}
if(山平)
System.out.println("山已平,指通豫南,達於漢陰");
else
System.out.println(“子孫斷代”) //while迴圈結束
}
}

//2 你能不能學會寫程式
public class 學會寫程式{
public static void main(String[]args){
if(天生智障||太懶)
System.out.println("估計是沒什麼希望");
else
System.out.println("學得會");
while(人活著)
{
if(你知道天冷可以先穿衣服後洗漱||你知道天熱可以後穿衣服先洗漱)

System.out.println("學得會");
if(你知道當有 生病||不能行動||意外緊急情況 時當日可以略過)

System.out.println("你可以向設計師發展");
}
}
}

//3 程式=演算法+結構
public class 程式{
public static void main(String[]args){
if(把演算法設計出來&&把結構描述出來)
System.out.println("此程式已然定型");

}
}


//4 程式設計語言

public class biancheng{
public static void main(String[]args){
if(你熟練掌握了一門語言)
System.out.println("你可以快速掌握並熟練編程");
}
}

大道至簡第一章讀後感(java虛擬碼)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.