Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to use dec in C++

#include <iostream>     // std::cout, std::dec, std::hex, std::oct

int main () {
  int n = 70;
  std::cout << std::dec << n << '
';// write integer value using decimal base format.
  std::cin >> std::dec >> n; //read integer value using decimal base format.
  return 0;
}
 
PREVIOUS NEXT
Tagged: #dec
ADD COMMENT
Topic
Name
1+3 =