Loading…
OS · First scripts · Program 09 · In the record
write a shell script to input Radius and print the area of the circle
1#!/bin/bash2 3echo "Enter the radius of the circle:"4read r5 6area=$(echo "scale=2; 3.14 * $r * $r" | bc)7 8echo "Area of the circle = $area"7Enter the radius of the circle: 7 Area of the circle = 153.86
Run program 09 in your browser
bash · just-bash. Change the code or the input, run it, break it, and see what happens.