Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Assignment1-TejasC #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions UNIX/TejasC/assign1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
echo "Enter three numbers"
read a b c
#acceptinig inputs
sum=$(($a+$b+$c))
echo "Their sum is" $sum
#if else statements to find the greatest no.
if [ $a -gt $b ];
then
if [ $a -gt $c ];
then
echo "1st is the greatest"
else
echo "3rd is the greatest"
fi
else
if [ $b -gt $c ];
then
echo "2nd is the greatest"
else
echo "3rd is the greatest"
fi
fi