Prove that a graph which contains a triangle cannot be bipartite

Before proof, we will define some basic terminologies. Bipartite Graph: A graph whose vertices can be divided into 2 disjoint sets such that no two vertices in the same set are adjacent to each other is called Bipartite Graph. Proof We can prove the given statement by contradiction. Suppose you have a bipartite graph G. …

Prove that a graph which contains a triangle cannot be bipartite Read More »

C Program to Calculate Simple Interest and Compound Interest

In this article, we will write a program to calculate simple interest and compound interest. The formula for simple interest and compound interest is given below: First the program will ask the user to enter principal amount, time period and rate of interest. Then we will use the above formulas to calculate S.I and C.I.