blob: 2a4edfc9f0c577536bdb58d87b8b7d9972b57cc3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//Eg-1.10
//pg-24
clear
clc
a=input("enter any number");
printf('Enter \n1 to find square root \n2 to find logarithm \n3 to find the exponential\n\n')
choice = input("Enter your choice");
select choice,
case 1 then r=sqrt(a);disp(r),
case 2 then r=log(a);disp(r),
case 3 then r=exp(a);disp(r),
else printf('Invalid Choice\n')
end
|