
- 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
Print the Mirror Image of Sine-Wave Pattern in C
Program Description
A sine wave or sinusoid is a mathematical curve that describes a smooth periodic oscillation. A sine wave is a continuous wave. It is named after the function sine, of which it is the graph. It occurs often in pure and applied mathematics, as well as physics, engineering, signal processing and many other fields.
Print the Mirror Image of Sine-Wave Pattern based on the Wave Height and Wave Length
Algorithm
Accept the Wave Height and Wave Length
Print the Wave Sign for the Wave Height and the Wave Length.
Example
/* Program to print the mirror image of Sine Wave*/ #include<stdio.h> int main(){ int wave_height; int wave_length; int i,j,k; clrscr(); /*Clears the Screen*/ printf("Please enter the wave height of Sign Wave: "); scanf("%d", &wave_height); printf("
"); printf("Please enter the wave length of Sign Wave: "); scanf("%d", &wave_length); printf("
"); for(i = 1; i <= wave_height; i++) { for(j = 1; j <= wave_length; j++){ for(k = 1; k <= wave_height; k++) { if(i == k || i + k == wave_height + 1) { printf("^^"); } else { printf(" "" "); } } } printf("
"); } getch(); return 0; }
Output
- Related Articles
- Print a String in wave pattern in C++
- C++ Program to Print Mirror Upper Star Triangle Pattern
- C++ Program for triangular pattern (mirror image around 0)
- Give the object a sine wave distortion to make it look wave with CSS
- Java Program to Print Mirror Upper Star Triangle Pattern
- Java Program to Print Mirror Lower Star Triangle Pattern
- Swift Program to Print Mirror Upper Star Triangle Pattern
- Swift program to Print Mirror Lower Star Triangle Pattern
- Golang Program To Print Mirror Lower Star Triangle Pattern
- Golang Program To Print Mirror Upper Star Triangle Pattern
- Print a matrix in Reverse Wave Form in C++
- Program to print a pattern of numbers in C++
- Program to print Interesting pattern in C++
- Program to print Kite Pattern in C++
- Program to print number pattern in C

Advertisements