C++ sin() function explanation with example

In C++, sin() method can be used to find the sine value of a number. It is defined in the C numeric library cmath. cmath contains a lot of other mathematical functions to make it easier for us.

Read

Write a C program to draw spiral two column number pattern

In this C programming tutorial, we will learn how to draw a spiral two column number pattern. This pattern looks like below:.

Read

C++ program to check if a number is Armstrong or not

In this C++ tutorial, we are going to learn how to check for an Armstrong number. A number is called an Armstrong number if the sum of its digits each raised to the power of the number of digits is equal to the number itself. ([wiki](https://en.wikipedia.org/wiki/Narcissisticnumber)).

Read

C++ program for Celsius to Fahrenheit and Fahrenheit to Celsius conversion

In this tutorial, we will learn how to convert a Celsius temperature value to Fahrenheit and vice versa. The program will take the inputs from the user and print out the result.

Read

C++ getchar() function explanation with example

C++ provides one function called getchar() to read user inputs.This function reads the next character from stdin. In this post, we will learn how this function works with an example.

Read

C++ program to count the total number of digits in a string

In this tutorial, we will learn how to count the total number of digits in a string in C++. The program will take a string as input from the user and prints out the result.

Read

C++ program to check if a number is power of 2 or not using its binary

In this C++ program, we will learn how to check if a number is power of 2 or not using its binary representation. The first method will use bitwise AND operation and the second one will count the number of 1 in its binary form.

Read

setTimeout, setImmediate and setInterval of Timer module in Node.js

Most of the time, we need to execute a piece of code after a specific interval of time. For example, using a timer, we can repeat the execution of a single code block at specific time intervals. This tutorial is on Node.js and I am going to discuss a few methods that can be used to add a timer in Node.js.

Read

C++ program to find simple interest

In this C++ example program, we will learn how to find the simple interest. The user will enter the inputs and it will calculate the simple interest and print it out to the user.

Read

C program to print half right angled triangle or half pyramid

In this C programming tutorial, we will learn how to print a half pyramid or half right angled triangle using a special character or any other character. In this tutorial, we will learn how to print a half right angled triangle :.

Read