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();
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();
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();
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(); } } }
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.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 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(); } } }
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();
}
}
}
張貼留言