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

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

C program to print hollow square or rectangle star pattern

Write a C program to print hollow square or rectangle star(*) pattern series using for loop. How to print hollow square or rectangle star pattern of N rows using for loop in C programming. Logic to print empty square or rectangle star pattern in C program.

Example

Input

Enter number of rows: 5

Output

Read more