開発環境
- OS: Windows 10 Pro
- IDE(統合開発環境): Visual Studio Community 2017
初めてのC# 第2版 (Jesse Liberty (著)、Brian MacDonald (著)、日向 俊二 (翻訳)、オライリージャパン)の3章(C#言語の基礎)、3.10(練習問題)、問題3-2.を取り組んでみる。
コード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int a = 1;
float b = 1.2f;
double c = 1.2;
char d = 'a';
Console.WriteLine("{0}\n{1}\n{2}\n{3}", a, b, c, d);
a = 2;
b = 2.3f;
c = 2.3;
d = 'b';
Console.WriteLine("{0}\n{1}\n{2}\n{3}", a, b, c, d);
}
}
}
入出力結果(コマンドプロンプト)
1 1.2 1.2 a 2 2.3 2.3 b 続行するには何かキーを押してください . . .
0 コメント:
コメントを投稿