The given problem asked in fico placement interview round. Find the gcd of two given numbers using shell scripting
We are given two numbers A and B and now task is to find the Greatest Common divisor (gcd) of two given number using shell scripting .
Asked in interview : FICO
Input 25 15 Output 5
This article is contributed by Ajay Puri. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- How to find time taken by a command/program on Linux Shell?
- Introduction to Linux Shell and Shell Scripting
- Making your own Linux Shell in C
- Developing a Linux based shell
- Basic Shell Commands in Linux
- Bash shell script to find sum of digits
- C program for pipe in Linux
- Linux Kernel Module Programming: Hello World Program
- find command in Linux with examples
- Program to show that Linux provides time sharing environment to processes
- Conditional Statements | Shell Script
- Basic Operators in Shell Scripting
- Looping Statements | Shell Script
- Reverse a String | Shell Programming
- Array Basics in Shell Scripting | Set 1