Bash Shell-Sum of two numbers

Bash Shell-Sum of two numbers

#!/bin/bash
   
    echo -n "Enter the first number : "
    read num1
    echo -n "Enter the second number : "
    read num2
    sum=`expr $num1 + $num2`
    echo "sum of two value is $sum"
RUN: 
    sh sum.sh
OUTPUT:
   Enter the first number : 23
   Enter the second number : 45
   sum of two value is 68

Comments

Popular posts from this blog

Introduction to C++ Programming Language

The Assembly Process Of 8086 Microprocessor-Two Pass Assembling Steps

Installing 8086 Assembler on a Computer