Write a program to find maximum of three numbers
Continue reading “maximum of three numbers”max of two numbers
Write a program to find maximum of two numbers.
Continue reading “max of two numbers”sizeof operator in C++
sizeof operator tells how much memory is used by the primitive data types. The C++ program uses sizeof operator to find the memory of primitive data types. The primitive data types are char, short, int, long, etc.
Continue reading “sizeof operator in C++”Program to convert Celsius to Fahrenheit
Write a program that convert inches to centimeters. For, example, if the input is 34 degree celsius, it should return 93.2 fahrenheit.
Continue reading “Program to convert Celsius to Fahrenheit”Program to find roots of quadratic equations
This program uses quadratic formula to find the roots of the quadratic equations.
Continue reading “Program to find roots of quadratic equations”C++ Floating Type Program
C++ has three different float types : float, double and long double. This program shows the implementation of these data types. In the next program, operations are performed on these float data types.
Continue reading “C++ Floating Type Program”C++ Character Type Program
Character type variables have the data type char. And the value is assigned using the apostrophe(‘). You can use type cast (int) to get the integral value of the character. Character is an integer type. So when you type cast it, you get the corresponding value as ASCII value of literal.
Continue reading “C++ Character Type Program”C++ Boolean Type Program
Boolean type returns 1 or 0. If the value if true it returns 1 else it returns 0. The boolean variable can have true or false.
Continue reading “C++ Boolean Type Program”C++ Program using Increment Operator
The values of variables can be incremented using ++ operator. And the value can be decremented using — operator. You can either pre-increment or post-increment the values.
Continue reading “C++ Program using Increment Operator”C++ program to add two numbers
Write a program to add two numbers x and y. Store the result in a variable z.
Continue reading “C++ program to add two numbers”