cout for long int : Long « Data Type « C++






cout for long int

cout for long int
 

#include <iostream>
using namespace std;

int main()
{
  int i = 10;
  long l = 1000000;
  double d = -0.0009;

  cout << i << ' ' << l << ' ' << d;
  cout << endl;

  return 0;
}


           
         
  








Related examples in the same category

1.Using atol: convert string to long
2.Using strtol: convert string to long
3.Using strtoul: convert string to unsigned long