1 / 11

計算機程式及實習 期末報告之口頭報告 ppt 製作 題目 : BMI 值計算機

計算機程式及實習 期末報告之口頭報告 ppt 製作 題目 : BMI 值計算機. 南台科技大學 機械工程系 班級 : 車輛三甲 學號 :49915045 學生 : 黃郁鈞. BMI 值計算機. BMI 值的計算就是 : 體重 / 身高 x 身高 身高需換算成公尺單位計算. 功能說明. 首先填入 身高 及 體重 接著選擇 性別 : 男 / 女 填寫完畢後 再 按下 的按鈕 最後結果會顯示在這裡 判別是否 過輕、適中、過重. 當未輸入任何數據資料時按下 則會出現   請填身高對話方塊   請填體重對話方塊.

claral
Download Presentation

計算機程式及實習 期末報告之口頭報告 ppt 製作 題目 : BMI 值計算機

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 計算機程式及實習期末報告之口頭報告ppt製作題目:BMI值計算機計算機程式及實習期末報告之口頭報告ppt製作題目:BMI值計算機 南台科技大學 機械工程系 班級:車輛三甲學號:49915045學生:黃郁鈞

  2. BMI值計算機 • BMI值的計算就是: • 體重 / 身高x身高 • 身高需換算成公尺單位計算

  3. 功能說明 首先填入 身高 及 體重接著選擇 性別 : 男 / 女填寫完畢後再按下 的按鈕最後結果會顯示在這裡 判別是否 過輕、適中、過重

  4. 當未輸入任何數據資料時按下 則會出現   請填身高對話方塊   請填體重對話方塊

  5. 以男生 身高170 體重65 來計算 BMI值結果為 :22 正常

  6. 程式碼撰寫:語言程式之實作方法 Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim hight, weight, tmp As Double Dim ans As Integer If TextBox1.Text = "" Then MessageBox.Show("請填身高") End If If TextBox2.Text = "" Then MessageBox.Show("請填體重") End If

  7. If TextBox1.Text <> "" Then If TextBox2.Text <> "" Then hight = CDbl(TextBox1.Text) weight = CDbl(TextBox2.Text) tmp = hight / 100 ans = weight / (tmp * tmp) Label4.Text = ans End If End If

  8. If RadioButton1.Checked = True Then If ans < 18 Then Label4.Text += "過輕" ElseIfans < 24 Then Label4.Text += "正常" ElseIfans >= 24 Then Label4.Text += "過重" End If End If

  9. If RadioButton2.Checked = True Then If ans < 18 Then Label4.Text += "過輕" ElseIfans < 24 Then Label4.Text += "正常" ElseIfans >= 24 Then Label4.Text += "過重" End If End If End Sub End Class

  10. 學習心得    第一次接觸Visual Basic 是在上大學之後的事情,上大學以前可以說是完全沒有程式語言的概念,一切都是重頭開始學,經過老師的教導下,動手寫程式讓我覺得有些許的成就感;而且還發現,原來小時候玩的電腦遊戲都是這樣子寫出來的,程式語言是電腦很重要不可或缺的一環。

  11. 參考文獻 • Visual Basic 2010輕鬆學習  作者:秦邦皓 • Pixnet:jarvis037 • Visual Basic 2010基礎必修課 作者:林義証.蔡文龍

More Related