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