• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

練習用です。いろんなものがごちゃまぜです。


Commit MetaInfo

Revision34 (tree)
Time2015-09-12 09:58:32
Authorbellyoshi

Log Message

(empty log message)

Change Summary

Incremental Difference

--- TeachYourSelf/feettoinches.cpp (revision 33)
+++ TeachYourSelf/feettoinches.cpp (revision 34)
@@ -1,15 +1,26 @@
11 #include <iostream>
22 using namespace std;
33
4+class feettoinches{
5+ int feet;
6+ int inches;
7+public:
8+ feettoinches(int feet);
9+};
10+
11+feettoinches::feettoinches(int feet)
12+{
13+ this->feet = feet;
14+ inches = feet * 12;
15+ cout << feet << "フィート" << "は" << inches << "インチです。";
16+}
17+
418 int main()
519 {
620 int feet;
7- int inches;
8-
921 cout << "何フィートかを入力:";
1022 cin >> feet;
11- inches = feet * 12;
12- cout << feet << "フィート" << "は" << inches << "インチです。";
23+ feettoinches cnv(feet);
1324
1425 return 0;
1526 }
\ No newline at end of file