herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
先說明一下這是後知後覺的解答,所謂後知就是股票價格已知存在陣列(清單),當然就要用迴圈練習,雙迴圈暴力解需時O(n**2),當然不用,採python單一迴圈解答「最佳股票的買賣時機#LeetCode 121 Best Time to Buy and Sell Stock」,解...
-
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
-
你會用C的算子sizeof?
-
Python CPP heap priority queue速解L eetcode 2530. Maximal Score After Applying K Operations heap/priority queue是重要的資料結構,無論是C++的std::priority_q...
-
C++ DP動態規劃解Leetcode 937 Maximum Number of Points with Cost 有些標示medium要比標示hard的問題還要難,Leetcode 1937. Maximum Number of Points with Cost,DP動態規...
64 則留言:
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=174, w=103, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();
h = Convert.ToDouble(tmp);
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();
w = Convert.ToDouble(tmp);
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi="+bmi);//輸出結果
Console.Read();
}
}
}
using System;
namespace bmi
{
class Program
{
static void Main(string[] args)
{
int m = 178;
int w = 79;
string temp;
Console.WriteLine("m=");
temp = Console.ReadLine();
m = Convert.ToInt32(temp);
Console.WriteLine("m=" + m);
Console.Write("w=");
temp = Console.ReadLine();
w = Convert.ToInt32(temp);
Console.WriteLine("w=" + w);
double bmi = 10000.0 * w / m / m;
Console.WriteLine("bmi=" + bmi);
Console.Read();
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("毛聖翔帥哥\n");
double h=173, w=54, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=167, w=60, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine(); //讀資訊
w = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=170, w=49, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi="+bmi);//輸出結果
Console.Read();
}
}
}
using System;
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp2//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace _2202020//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=185, w=90, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//轉資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//轉資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;
namespace bmi
{
class Program
{
static void Main(string[] args)
{
int m = 178;
int w = 79;
string temp;
Console.WriteLine("m=");
temp = Console.ReadLine();
m = Convert.ToInt32(temp);
Console.WriteLine("m=" + m);
Console.Write("w=");
temp = Console.ReadLine();
w = Convert.ToInt32(temp);
Console.WriteLine("w=" + w);
double bmi = 10000.0 * w / m / m;
Console.WriteLine("bmi=" + bmi);
Console.Read();
using System;
namespace bmi
{
class Program
{
static void Main(string[] args)//主程式
{
int h = 178;//宣告變數
int w = 79;
string temp;
Console.Write("h=");
temp = Console.ReadLine();//讀資訊
h = Convert.ToInt32(temp);//轉型態
Console.WriteLine("h=" + h);
Console.Write("w=");
temp = Console.ReadLine();//讀資訊
w = Convert.ToInt32(temp);//轉型態
Console.WriteLine("w=" + w);
double bmi = 10000.0 * w / h / h;
Console.WriteLine("bmi="+bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace T0304//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace project0304//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace BMI//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp2//命名空間
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=169, w=60, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199,w=100,bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("Force 1096\n");
Double h=180, w=69, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("W=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace project02//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=172, w=65, bmi;//宣告變數
String tmp;
Console.WriteLine("h=");//讀資訊
tmp = Console.ReadLine();//轉型態
h = Convert.ToDouble(tmp);
Console.WriteLine(h);
Console.WriteLine("w=");//讀資訊
tmp = Console.ReadLine();//轉型態
w = Convert.ToDouble(tmp);
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=160, w=48, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute bmi\n");
double h=170, w=95, bmi;//宣告變數
string tmp;
Console.WriteLine("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.WriteLine("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace baibaideApp1//命名空間
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=160, W=58, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
W = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(W);
h = h / 100;
bmi = W / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace _20200304//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=150, w=43, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=174, w=103, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();
h = Convert.ToDouble(tmp);
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();
w = Convert.ToDouble(tmp);
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi="+bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("Compute Bmi\n");
double h=180, w=70, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine(); //讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=170, w=60, bmi;//宣告變數
string tmp;
Console.Write("h=");//讀資訊
tmp = Console.ReadLine();//轉型態
h = Convert.ToDouble(tmp);
Console.WriteLine(h);
Console.Write("w=");//讀資訊
tmp = Console.ReadLine();//轉型態
w = Convert.ToDouble(tmp);
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi); //輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=166, w=50, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" +bmi);//輸出結果
Console.Read();
}
}
}
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199,w=100,bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
using System;//命名空間
namespace ConsoleApp2//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
namespace ConsoleApp1//命名空間
{
class Program//分類
{
static void Main(string[] args)//主程式
{
Console.Write("嘎\n");
Double h=174, w=56, bmi;//宣告變數
string tmp;
Console.Write("w=");
tmp = Console.ReadLine();
w = Convert.ToDouble(tmp);
Console.WriteLine(h);
Console.Write("h=");
tmp = Console.ReadLine();
h = Convert.ToDouble(tmp);
Console.WriteLine(h);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//結果
Console.Read();
using System;
namespace BMI
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("Compute Bmi \n");
double h = 200, w = 100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("Compute Bmi \n");
double h=178, w=68, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=175, w=50, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=165, w=60, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BMI
{
class Program//BMI
{
static void Main(string[] args)//主程式
{
Console.Write("左邊那位");
int m = 173; //宣告變數
int w = 87; //宣告變數
string temp;
Console.Write("m=");
temp= Console.ReadLine();//讀資料
m = Convert.ToInt32(temp);//轉型態
Console.WriteLine("m=" +m);
Console.Write("w=");
temp = Console.ReadLine();
w = Convert.ToInt32(temp);
Console.WriteLine("w=" +w);
double bmi = 10000.0 * w / m / m;
Console.WriteLine("bmi="+bmi);//輸出結果
Console.Read();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int m = 178;
int w = 79;
string temp;
Console.Write("m=");
temp = Console.ReadLine();
m = Convert.ToInt32(temp);
Console.WriteLine("m=" + m);
Console.WriteLine("w=");
temp = Console.ReadLine();
w = Convert.ToInt32(temp);
Console.WriteLine("w=" + w);
Double bmi = 10000.0 * w / m / m;
Console.WriteLine("bmi=" + bmi);
Console.Read();
}
}
}
using System;//BMI
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace bmi_1
{
class Program//BMI
{
static void Main(string[] args)//主程式
{
Console.WriteLine("右邊那位");
int m =183;//宣告變數
int w =60;//宣告變數
string temp;
Console.Write("m=");
temp = Console.ReadLine();//讀資訊
m = Convert.ToInt32(temp);//轉形態
Console.WriteLine("m="+m);
Console.Write("w=");
temp = Console.ReadLine();//讀資訊
w = Convert.ToInt32(temp);//轉形態
Console.WriteLine("w="+w);
double bmi = 10000.0 * w / m / m;//BMI公式
Console.WriteLine("bmi="+bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace BMI
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=180, w=75, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);
Console.Read();
}
}
}
using System;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h = 199,w =100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace BMI
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=180, w=75, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);
Console.Read();
}
}
}
using System;//命名空間
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=165, w=68, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;
namespace ComsoleAppl//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.WriteLine("compute Bmi\n");
double h=179,w=60,bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();
w = Convert.ToDouble(tmp);
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp2//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h =199, w =100, bmi;//宣告變數
string tmp;//宣告字串變數
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
using System;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h = 199,w =100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace _0405
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("Hello World!\n");
double h=169, w=54, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp =Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);
Console.Read();
}
}
}
using System;
namespace ComsoleAppl//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.WriteLine("compute Bmi\n");
double h=179,w=60,bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();
w = Convert.ToDouble(tmp);
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace Project02//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace project02//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace BMI//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
using System;//命名空間
namespace Program02//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compule Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp); //讀型態
Console.WriteLine(h);
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp); //讀型態
Console.WriteLine(h);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace project02//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");//宣告變數
double h = 172, w = 75, bmi;
string tmp;
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h= Convert.ToDouble(tmp); //轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine(); //讀資訊
w = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=170, w=53, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace Program02//命名空間
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine(); //讀資訊
w = Convert.ToDouble(tmp); //轉機型
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace Console//命名空間
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine(); //讀資訊
w = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.Write("bmi" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace ConsoleApp1//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=170, w=49, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi="+bmi);//輸出結果
Console.Read();
}
}
}
using System;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h = 199,w =100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
w = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
namespace BMI//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
int h = 195;
int w = 80;
string temp;
//宣告變數
Console.Write("h=");
temp = Console.ReadLine();//讀資訊
h = Convert.ToInt32(temp);//轉型態
Console.WriteLine("h=" + h);
Console.Write("w=");
temp = Console.ReadLine();//讀資訊
w = Convert.ToInt32(temp);//轉型態
Console.WriteLine("w=" + w);
double bmi = 10000.0 * w / h / h;
Console.WriteLine("bmi="+bmi);//輸出結果
Console.Read();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("computc Bmi \n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine(); //讀資訊
w = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("computc Bmi \n");
double h=180, w=190, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine(); //讀資訊
w = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("computc Bmi \n");
double h=169, w=95, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine(); //讀資訊
w = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)//主程式
{
Console.Write("computc Bmi \n");
double h=189, w=105, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine(); //讀資訊
h = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine(); //讀資訊
w = Convert.ToDouble(tmp); //轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp2//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
using System;//命名空間
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp2//命名空間
{
class Program//類別
{
static void Main(string[] args)//主程式
{
Console.Write("compute Bmi\n");
double h=199, w=100, bmi;//宣告變數
string tmp;
Console.Write("h=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(h);
Console.Write("w=");
tmp = Console.ReadLine();//讀資訊
h = Convert.ToDouble(tmp);//轉型態
Console.WriteLine(w);
h = h / 100;
bmi = w / (h * h);
Console.WriteLine("bmi=" + bmi);//輸出結果
Console.Read();
}
}
}
張貼留言