Movement of stack without graphics in C programming
I this C++ program we are going to implement of stack data structure without graphics. Here in the main function I define, user enters a character and a variable x I are define at this point with increment of one. There is function call ‘hori’ for horizontal path.
Horizontal path contains one for loop and the range is 4 to 30.
Then with x = 31 and y = 15 the ‘hori’ function call ‘para’ function for parabolic path.
Parabolic path contains one for loop with the range of a = 50 and b = 30 and prints the corresponding result.
For vertical path I made a function call ‘vert’.
This function contains one for loop for y axis with the range of 31 to 40 and prints the corresponding result.
Finally the program terminates.
In the very beginning the program wants an input from the user.
Step 1: firstly x = 4 and y = 15
Step 2: the loop prints the horizontal value of the given value.
Step 3: then program goes to para function
Step 1: this is the parabolic path
Step 2: here x = 31 and y = 15
Step 3: the loop prints the value for x and y axis for x equals to 50 and y equals to 30
Step 4: now the new function is called by the function is vert
Step 1: vertical path for the value
Step 2: here only for y axis the program prints the value
Step 3: after that the program terminates
Download Source Code C Program: An implementation of Stack Data Structure without Graphics