C program to print natural numbers in reverse from n to 1

Write a C program to print all natural numbers in reverse from n to 1 using for loop. How to print natural numbers in reverse order in C programming. Logic to print natural numbers in reverse for a given range in C program.

Example

Input

Input N: 10

Output

Natural numbers from 10-1 in reverse: 
10, 9, 8, 7, 6, 5, 4, 3, 2, 1

Read more

How to create new C/C++ project in CodeBlocks

Hello friends, being a beginner to C/C++ everyone once had this question Where to write C/C++ codes? How to compile it? How to run it?. Codeblocks provides an ultimate solution to all these mentioned problems.

Code::Blocks is a IDE(Integrated Development Environment) for creating C/C++ projects. It is simple to use and provides very basic but powerful interface. CodeBlocks can be used for creating, editing, compiling, running and debugging C/C++ projects. Here is a beginner guide to use CodeBlocks.

Before preceding you must have Codeblocks with C/C++ compiler installed in your computer. If you don’t have Codeblocks installed download and install it before moving to the next step.

Read more

C program to print pascal triangle

Write a C program to print pascal triangle up to n rows using loop. Logic to print Pascal triangle in C programming. How to print Pascal triangle of n rows using loop in C program.

Example

Input

Input rows: 5

Output

    1
   1 1
  1 2 1
 1 3 3 1
1 4 6 4 1

Read more

Star patterns in C programming

Star patterns are a series of * or any other character used to create some pattern or any geometrical shape such as – square, triangle(Pyramid), rhombus, heart etc. These patterns are often prescribed by many programming books and are best for practicing flow control statement. Many programmers around world extremely recommended pattern problems, to enhance … Read more