Home » Articles posted by Abhishek Gupta

# Author Archives: Abhishek Gupta

## ALGORITHM FOR BASIC GATES

A logic gate is simply an electronic circuit which operates on one or more input singles and produces a output.

## TYPES OF LOGIC GATES

There are eight types of logic gates which can generate different outputs for the inputs. They can have any number of inputs lines but they have always a single output line. These eight logic gates as: (more…)

## C PROGRAM TO PRINT COPY CONCATENATE STRING

A string is a character array which stores characters as an Integer is stored in Integer array. Each string is terminated by a null denoted by “\0”. The null character “\0” tells the function where the string is ended. (more…)

## C PROGRAM TO DELETE ALL VOWELS FROM STRING

// C PROGRAM TO DELETE ALL VOWELS FROM STRING

// DATE: 09-07-2015

#include<stdio.h>

#include<conio.h>

#include<string.h> (more…)

## ALGORITHM AND FLOWCHART FOR PRIME NUMBER

Every Prime number has two factors and these are 1 and the number itself. If N is Prime Number then its factors will be 1 and N. Thus a Prime Number is divisible by 1 and itself. Example of Prime Numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and so on. The smallest Prime Number is 2 and it is an Even Number. Except 2 all Prime Numbers are Odd Numbers. (more…)

## ALGORITHM TO FIND GREATEST COMMON DIVISOR

The GCD or greatest common divisor of two or more positive numbers is the greatest number which divides each number completely (Leaving no remainder). For example 6 and 18 are divisible by 2, 3, and 6. But 6 is the greatest number among 2, 3 and 6. Thus 6 is the GCD of 6 and 18. Similarly GCD of 10, 15 and 35 is 5. GCD is also known as HCF or Highest Common Factor. (more…)

## ALGORITHM AND FLOWCHART FOR COPRIME NUMBER

A Coprime number comes in pair of integers. Thus they are defined as those paired numbers which can be divided by the common number 1 are called coprime numbers. Suppose a and b are two positive integers and they are divisible by only 1. Then a and b are co-prime number. For example 3 and 5 are only divisible by 1. Thus 3 and 5 are co-prime number. If a and b are divisible by some more numbers other than 1 then they are not co-prime number. For example 6 and 10 are not co-prime number. Because 6 and 10 are divisible 2 also other than 1. A coprime number is also known as relatively prime and mutually prime number.  (more…)

## ALGORITHM AND FLOWCHART FOR COMPOSITE NUMBER

Those numbers which are divisible by other than itself and 1 are known as composite numbers. The number 4 can is divisible by 1, 2 and 4 therefore 4 is a composite number. But 7 is divisible by only 1 and 7 thus 7 is not a composite number. For example 8, 6, 9, 25, 102, 502 etc. The smallest composite number is 4. 1, 2 and 3 are not composite numbers. 2 and 3 are prime numbers. (more…)