This code print diamond pattern of stars. Diamond shape is as follows: * *** ***** *** *
Category: C programs
Pascal Triangle is one of the most interesting number patterns. It is named after Blaise Pascal, a famous French Mathematician and Philosopher. To build the pascal triangle, we start with “1” at the top, then continue placing numbers below it in a triangular pattern. Each number is the two numbers above it added together except for the […]
This program checks whether an input alphabet is a vowel or not. Both lower-case and upper-case are checked i.e a, A, e, E, I, i, o, O, u, U. #include <stdio.h> #include <conio.h>
This program shows how to convert an infix expression to postfix expression. Before proceeding to program, first understand what is difference between infix expression and postfix expression. Infix notation: X + Y. Operators are written in-between their operands. Postfix notation (also known as “Reverse Polish notation”) : X Y + . Operators are written after […]
The following program prints first 10 automorphic number. I am giving you all brief introduction about what actually automorphic numbers are, assuming that some of you might not be aware about that. In mathematics an automorphic number (sometimes referred to as a circular number) is a number whose square “ends” in the same digits as number itself. For example, 52 = 25, 62 = 36, 762 = […]
/* Calculate Permutation and Combination (nCr and nPr) Using Function */ #include<stdio.h> #include<conio.h> void main()