97 2 programming language
This presentation is the property of its rightful owner.
Sponsored Links
1 / 3

97-2 Programming Language PowerPoint PPT Presentation


  • 75 Views
  • Uploaded on
  • Presentation posted in: General

97-2 Programming Language. Exercise #1: function. Demo 1. 試撰寫 int mod(int x, int y) 函數,計算 x/y 的餘數。並利用此函數來計算 mod(17, 5) ,即計算 的餘數。. Demo 2. 試撰寫一 int prime(int n) ,可用來找出第 n 個質數(第一個質數為 2 ,第二個質數為 3 ,以此類推),並以此函數找出第 100 個質數。.

Download Presentation

97-2 Programming Language

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


97 2 programming language

97-2 Programming Language

Exercise #1: function


Demo 1

Demo 1

  • 試撰寫int mod(int x, int y) 函數,計算x/y的餘數。並利用此函數來計算mod(17, 5),即計算 的餘數。


Demo 2

Demo 2

  • 試撰寫一int prime(int n),可用來找出第n個質數(第一個質數為2,第二個質數為3,以此類推),並以此函數找出第100個質數。


  • Login