「C++」boolean型のサンプル

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
#include <iostream>
using namespace std;
int main() {
bool cftA = true;
bool cftB = false;
cout << cftA << "\n";
cout << cftB;
return 0;
}
#include <iostream> using namespace std; int main() { bool cftA = true; bool cftB = false; cout << cftA << "\n"; cout << cftB; return 0; }
#include <iostream>
using namespace std;

int main() {
  bool cftA = true;
  bool cftB = false;
  cout << cftA << "\n";
  cout << cftB;
  return 0;
}

実行結果
1
0

C++

Posted by arkgame