Even Number: Any integer that is divisible by 2 is called even number. For example: 2,4,6,20 etc. are even numbers. Odd Number: Any i...
World of Computer Programming in C
Even Number: Any integer that is divisible by 2 is called even number. For example: 2,4,6,20 etc. are even numbers. Odd Number: Any i...
Let A (x 1 , y 1 ) and B (x 2 , y 2 ) are two points. Then the formula to calculate the distance between these two points is: In general,...
In this post, I am going to show you how to convert a string to a single integer number. Sometimes we need to take input the number as a str...
A string is said to be palindrome if it remains same after reversing it. That is, it is read same in both ways. For example: MADAM, 1001, 11...
Numbers with base 16 are called Hexa Decimal number (i.e. 0,1....,9,A,B,C,D,E,F) and numbers with base 2 are called Binary Numbers (i.e. 0, ...
In my last post I had discussed about how to reverse a string . In this post I am showing another method of reversing a string. I will use a...
In this post, I am going to share two ways of reversing a string in C. First one is the easy one. All you need to do is just print the input...
Every string in a c program is actually a NULL terminated character array. So if we initialize an array like this: char str[] = "HELLO...
Binary Number: Binary number system has base 2. That means it consts of two numbers (0 and 1) only. HexaDecimal Number: HexaDecimal numb...
Bubble sort is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent...
From Wikipedia : In mathematics, the sieve of Eratosthenes (Greek: κόσκινον Ἐρατοσθένους), one of a number of prime number sieves, is a si...
In mathematics, an arithmetic progression (AP) or arithmetic sequence is a sequence of numbers such that the difference between the con...
Floyd's triangle is a right-angled triangular array of natural numbers, used in computer science education. It is named after Robert ...
We can create random numbers with the help of library function rand(). This library function is included in the header file stdlib.h . This ...
We are actually going to find the sum of following series: 1 + 2 + 3 + ..... + n To do so, we need to start a loop from 1 and need to do s...
This program prints prime numbers within a range. If you want to check a number is prime or not, you may visit this link. /*Prime Number...
A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. A natural number great...
Armstrong Number: A number is armstrong if the sum of cubes of individual digits of a number is equal to the number itself. For example 3...
Palindrome numbers are those which remains same after reversing. For a better concept I am quoting from Wikipedia : A palindromic number...
The following program will help you to find the largest prime factor of a number. If you want to know know about prime factors you may vis...