質問編集履歴
1
画像からコピペに変更しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,18 +8,44 @@
|
|
8
8
|
```
|
9
9
|
|
10
10
|
```
|
11
|
-
|
11
|
+
```ここに言語を入力
|
12
|
+
コード
|
13
|
+
```
|
12
14
|
### 該当のソースコード
|
13
15
|
|
16
|
+
//十六進数に変換
|
17
|
+
#include<iostream>
|
18
|
+
using namespace std;
|
19
|
+
|
20
|
+
int main()
|
21
|
+
{
|
22
|
+
int a = 10, b = 100;
|
23
|
+
|
24
|
+
|
25
|
+
cout << "10進数" << endl;
|
26
|
+
cout.setf(ios::dec);
|
27
|
+
cout << "a=" << a << endl;
|
28
|
+
cout << "b=" << b << endl << endl;
|
29
|
+
cout.setf(ios::dec);
|
30
|
+
|
31
|
+
cout << "16進数の表示" << endl;
|
32
|
+
cout.setf(ios::hex);
|
33
|
+
cout << "a=" << a << endl;
|
34
|
+
cout << "b=" << b << endl << endl;
|
35
|
+
cout.unsetf(ios::hex);
|
36
|
+
|
14
|
-
|
37
|
+
return 0;
|
15
|
-
|
38
|
+
}
|
39
|
+
|
40
|
+
|
16
41
|
```
|
17
42
|
|
18
43
|
### 本を見ながら数回書き直しました
|
19
44
|
|
20
|
-
### 補足情報(FW/ツールのバージョンなど
|
45
|
+
### 補足情報(FW/ツールのバージョンなど
|
21
|
-

|
22
46
|
|
23
|
-

|
24
47
|
|
25
|
-
|
48
|
+
}```c++
|
49
|
+
|
50
|
+
コード
|
51
|
+
```
|