Sayhello

使用軟體: Visual c# 2008 Express

輸入姓名和日期的程式

----------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("請依序輸入你的姓名和生日....");
Console.WriteLine(" ");
Console.Write("姓名:");
string readString = Console.ReadLine();
Console.WriteLine(" ");
Console.Write("生日:");
string readString2 = Console.ReadLine();
Console.WriteLine(" ");
Console.Write("Hello," + readString + "你好,你的生日是" + readString2 );
Console.ReadLine();
}
}
}
-----------------------------------------------------



.

0 意見: