
- C Programming Tutorial
- C - Home
- C - Overview
- C - Environment Setup
- C - Program Structure
- C - Basic Syntax
- C - Data Types
- C - Variables
- C - Constants
- C - Storage Classes
- C - Operators
- C - Decision Making
- C - Loops
- C - Functions
- C - Scope Rules
- C - Arrays
- C - Pointers
- C - Strings
- C - Structures
- C - Unions
- C - Bit Fields
- C - Typedef
- C - Input & Output
- C - File I/O
- C - Preprocessors
- C - Header Files
- C - Type Casting
- C - Error Handling
- C - Recursion
- C - Variable Arguments
- C - Memory Management
- C - Command Line Arguments
- C Programming useful Resources
- C - Questions & Answers
- C - Quick Guide
- C - Useful Resources
- C - Discussion
Program to print numeric pattern in C
Program Description
Print the numeric pattern by accepting the number of rows from the user.
Input: 5 Rows
1 6 2 10 7 3 13 11 8 4 15 14 12 9 5
Algorithm
Print the pattern from the end of each Row Complete the last column of each Row Start from the Second Last Column of the second row Repeat till the number of rows specified by the User.
Example
/*Program to print Numeric Pattern */ #include<stdio.h> int main() { int k, l, m, count=1; int rows; clrscr(); printf("
Please enter the number of rows for the Numeric Pattern: "); scanf("%d",&rows); for (k = 1; k <= rows; k++) { m = count; for (l = 1; l <= k; l++) { printf("%d",m); m = m - (rows + l - k); } printf("
"); count = count + 1 + rows - k; } getch(); return 0; }
Output
- Related Articles
- Swift Program to Print Inverted Numeric Pattern
- Swift Program to Print Numeric Pyramid Pattern
- Swift program to Print Numeric Hourglass Pattern
- Swift Program to Print Reverse Numeric Pyramid Pattern
- Swift program to Print Upper Numeric Triangle Pattern
- Swift program to Print Half Diamond Numeric Pattern
- Program to print Interesting pattern in C++
- Program to print Kite Pattern in C++
- Program to print number pattern in C
- Program to print Diamond Pattern in C
- Program to print pyramid pattern in C
- Program to print a rectangle pattern in C++
- C++ Program to Print Square Star Pattern
- C++ Program to Print 8 Star Pattern
- C++ Program to Print X Star Pattern

Advertisements