The document outlines a shell script assignment consisting of 31 programming tasks. These tasks include basic arithmetic operations, geometric calculations, number checks (like even/odd, prime, and palindrome), and various mathematical functions such as factorial and Fibonacci series. The assignment is designed to enhance programming skills through practical applications in shell scripting.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
10 views2 pages
Linux Assignment Number 4
The document outlines a shell script assignment consisting of 31 programming tasks. These tasks include basic arithmetic operations, geometric calculations, number checks (like even/odd, prime, and palindrome), and various mathematical functions such as factorial and Fibonacci series. The assignment is designed to enhance programming skills through practical applications in shell scripting.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
Assignment Number -4
Write a shell script for the following programs.
1) Write a program to find addition of three numbers. 2) Write a program to find addition, subtraction, multiplication, division of two numbers. 3) Write a program to find average of four numbers. 4) Write a program to find area of circle. 5) Write a program to find circumference (perimeter) of circle. 6) Write a program to find area of triangle. 7) Write a program to find area of square. 8) Write a program to find area of rectangle. 9) Write a program which accepts six subject marks and calculates total marks and percentage of student. 10) Write a program to check entered number is positive or negative. 11) Write a program to check entered number is even or odd. 12) Write a program to check entered year is leap or not. 13) Write a program to find maximum number between two numbers. 14) Write a program to find minimum number between two numbers. 15) Write a program to find maximum number between three numbers. 16) Write a program to find minimum number between three numbers. 17) Write a program to check entered number is positive or negative or zero. 18) Write a program that check whether a person is eligible for voting or not. (Hint: Take person age as input) 19) Write a program which find sum of even numbers and odd numbers from 1 to 20. 20) Write a program which find sum of first ‘n’ numbers. 21) Write a program which prints factors of entered number. 22) Write a program which check entered number is Perfect or not. (6, 28, 496 etc. are perfect) 23) Write a program which find sum of digits (digit sum) of entered number. 24) Write a program which check entered number is Armstrong or not. (1, 153, 370,371 etc. are Armstrong) 25) Write a program which reverses the entered number. 26) Write a program which check entered number is Palindrome or not. 27) Write a program which finds face value of entered number. 28) Write a program which check entered number is Prime or not. 29) Write a program which finds factorial of an entered number. 30) Write a program which prints Fibonacci series up to ‘n’ numbers. 31) Write a program that prints following pattern: