In this article, you will learn to calculate the factorial of a number. Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. For example factorial Read more →
Programs
1 postIn this article, you will learn to print the Fibonacci sequence of first n term. Fibonacci Series generates subsequent number by adding two previous numbers. The first two terms of the Fibonacci Read more →
In this example, you will learn to reverse the given number using these two methods. Examples : Input : 123 Output : 321 Input : 1995 Output : 5991 Approach used : Read more →
C Program to check whether the given integer is positive or negative. Examples : Input: 50 Output: Number is Positive. Input: -25 Output: Number is Negative. Input: 0 Output: Number is Positive Read more →
In this article, you will learn to print “Hello, World!” on the screen in C programming. Most students of programming languages, start from the famous ‘Hello World’ code. This program prints ‘Hello Read more →
Given an integer n, find value of its square root. Examples : Input: n = 16 Output: 4 Input: n = 8 Output: 2 Note – floor value of 2.8 is 2. Read more →
Write a C++ program to check whether a given number is positive, negative or 0. Examples : Number = -44 Output: Negative Number = 0 Output: 0 Number = 50 Output: Positive Read more →
In this article, we have discussed various methods to multiply two numbers in C++. These are simple program, you can learn them easily. Method-1 : With Hardcoded Inputs Output: 30 Method-2 : Read more →
In this article, we have discussed various methods to subtract two numbers in C++. These are simple program, you can learn them easily. Method-1 : With Hardcoded Inputs Output: -1 Method-2 : Read more →
In this article, we have discussed various methods to add two numbers in C++. These are simple program, you can learn them easily. Method-1 : With Hardcoded Inputs Output: 11 Method-2 : Read more →