This is a single line comment : Comments « Language « C++






This is a single line comment

This is a single line comment



#include <iostream>
using namespace std;
int main()
{
  int i;
  cout << "This is output.\n";  // this is a single line comment

  cout << "Enter a number: ";
  cin >> i;

  cout << i << " squared is " << i*i << "\n";
  return 0;
}

           
       








Related examples in the same category