Program to convert Decimal to Hexadecimal C++

Decimal Number System:  It is base 10 number system which uses the digits from 0 to 9. Hexadecimal Number System: It is base 16 number system which uses the digits from 0 to 9 and A, B, C, D, E, F. Logic to Convert Decimal to Hexadecimal C++: Divide the original decimal number by 16. … Read more

Program to convert Fahrenheit to Celsius in C++

Write a program to convert Fahrenheit to Celsius in C++.

This program is really simple we just use the following formula to get the converted temperature.

Celsius = (fahrenheit – 32) / 1.8

PROGRAM:

#include <iostream>
using namespace std;

int main()
{
    float celsius;
    float fahrenheit;

    cout << "Enter Fahrenheit temperature: ";
    cin >> fahrenheit;
    celsius = (fahrenheit-32)/1.8;
    cout << "Temperature in Celsius = " << celsius << endl;

    return 0;
}

 

OUTPUT:

convert fahrenheit to celsius in c++

 

To Convert Celsius to Fahrenheit:

Program to convert Celsius to Fahrenheit

Program to convert Celsius to Fahrenheit in C++

Write a Program to convert Celsius to Fahrenheit in C++.

This program is really simple just use the following formula to get the temperature converted into Fahrenheit.

Fahrenheit = (1.8 * celsius) + 32

 

PROGRAM:

#include <iostream>
using namespace std;

int main()
{
    float celsius;
    float fahrenheit;

    cout << "Enter Celsius temperature: ";
    cin >> celsius;
    fahrenheit = (1.8 * celsius) + 32;
    cout << "Fahrenheit = " << fahrenheit << endl;

    return 0;
}

 

OUTPUT:

convert fahrenheit to celsius in c++

 

To Convert Fahrenheit to Celsius:

Program to convert Fahrenheit to Celsius

Program to convert Infix to Postfix in C++

Write a Program to convert Infix to Postfix in C++. PROGRAM: /* Infix to postfix conversion in C++ Input Postfix expression must be in a desired format. Operands and operator, both must be single character. Only '+' , '-' , '*', '/' and '$' (for exponentiation) operators are expected. */ #include<iostream> #include<stack> #include<string> using namespace … Read more