using System.Collections;
using System.Collections.Generic;
public static void Main()
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine (" * ");
Console.WriteLine (" *** ");
Console.WriteLine ("*****");
Console.WriteLine ($"=== {++count} ===");
string s1 = "ALL MEN ARE CREATED QEUAL";
s2 = s1.Substring (12,3);
Console.WriteLine ($"=== {++count} ===");
Console.Write (s1.IndexOf('c') + " ");
Console.WriteLine (s1.Length);
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine ("A, C, D 什麼可變不可變,內容? 記憶體空間?");
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine ((float)x_i + x_f * x_z - (x_i += (short)x_f));
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine ($"=== {++count} ===");
max = (max > y) ? max : y;
max = (max > z) ? max : z;
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine (x == y);
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine (((x % 2) == 1) ? "奇數" : "偶數");
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine ((x >= 0) ? "正數" : "負數");
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine ((x >= 0) ? x : x *= -1);
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine ((x >= 20) ? "可投票" : "不可投票");
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine ((t <= 0) ? "凍僵了" : (t <= 10) ? "很冷" : (t <= 20) ? "有點冷" : (t <= 30) ? "舒適" : (t <= 40) ? "熱" : "非常熱");
Console.WriteLine ($"=== {++count} ===");
int[] t1 = new int[] {120, 330, 500, 700, 1000, 9999};
int[] t2 = new int[] {120, 210, 270, 200, 300, 9999};
int[] t3 = new int[] {163, 238, 352, 480, 566, 641};
x = (x > 9999) ? 9999 : x;
for (int i = 0; i < 6; ++i) {
Console.WriteLine (money / 100);
Console.WriteLine ($"=== {++count} ===");
string[] daily = new string[] {"Monday", "Tuesday", "Wensday", "Forthday", "Friday", "Saturday", "Suday"};
Console.WriteLine (daily[x - 1]);
Console.WriteLine ($"=== {++count} ===");
int[] days = new int[] {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
foreach (int dd in days) {
Console.Write (dd + " ");
Console.WriteLine ($"=== {++count} ===");
if ((y % 400 == 0) || (y % 4 == 0) && (y % 100 != 0)) {
Console.WriteLine ("Years: " + y + " Month " + x + " days " + day );
Console.WriteLine ($"=== {++count} ===");
for (int i = 0; i < 100; ++i) {
Console.Write ( (i + 1) + " ");
Console.WriteLine ($"=== {++count} ===");
for (int i = 0; i < 100; ++i) {
Console.Write ( (i + 1) + " ");
Console.WriteLine ($"=== {++count} ===");
for (int i = 0; i < 100; ++i) {
Console.Write ( (i + 1) + " ");
Console.WriteLine ($"=== {++count} ===");
for (int i = 1; i < x; ++i) {
Console.WriteLine (b_21 ? "完全數" : "非完全數");
Console.WriteLine ($"=== {++count} ===");
for (int i = 0; i < x; ++i) {
Console.WriteLine (total_22);
Console.WriteLine ($"=== {++count} ===");
Console.Write ($"x = {x}, ");
char dec = ((x % 2) > 0) ? '1' : '0';
total_s_23 = $"{dec}{total_s_23}";
Console.WriteLine (total_s_23);
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine ($"=== {++count} ===");
Console.WriteLine ("No Read Line");
Console.WriteLine ($"=== {++count} ===");
Dictionary <string, int> char_map = new Dictionary <string, int> ();
string str_26 = "Hello World!";
for (int i = 0; i < str_26.Length - 1; ++i) {
string tmp_chr = str_26.Substring (i, 1);
char_map.TryAdd (tmp_chr, 0);
foreach (KeyValuePair <string, int> kvp in char_map) {
Console.WriteLine ($"key={kvp.Key}, value={kvp.Value}");
Console.WriteLine ($"=== {++count} ===");
for (int i = 1; i <= 9; ++i) {
for (int j = 1; j <= 9; ++j) {
Console.Write ($"{i}*{j}={i*j} ");