how to use dec in C++

[ad_1]

how to use dec in C++
#include      // std::cout, std::dec, std::hex, std::oct

int main () {
  int n = 70;
  std::cout << std::dec << n << '\n';// write integer value using decimal base format.
  std::cin >std::dec n; //read integer value 
Read More

C++ Area of Scalene Triangle

[ad_1]

C++ Area of Scalene Triangle
    float a, b, c, d, e;
    
    cout << "Finding the Area of Scalene Triangle using Heron's Formula\n";
    cout << "1st Side of a Triangle: ";
    cin >a;  
    cout << "2nd Side of a Triangle: ";
    cin >b;
    cout << "Angle Between Sides: ";
    cin >c;

    e = 0.5 *  (a + b + c); 	
Read More

erosion and dilation c++

[ad_1]

erosion and dilation c++
// C++ program to implement the erosion
// and dilation
#include 
#include 
  
// Library to include for drawing shapes
#include 
#include 
using 
Read More

C++ Kelvin to Celsius

[ad_1]

C++ Kelvin to Celsius
	float cel, kel;
    
    cout << "Enter the temperature in Kelvin: ";
    cin >kel;

    cel = kel - 273.15; //T(°C) = T(K) - 273.15

    cout << "The temperature of " << kel << " in Celsius is: " << cel;

[ad_2]… Read More

g++ -wall option meaning

[ad_1]

g++ -wall option meaning
-Wall (Compilation option): Produce warning messages about a number of things that are legal but dubious. I strongly suggest that you always 
Read More