Shell script to convert decimal no. to any other base no., Programming Languages

W.A.S.S to covert decimal number to any other base.

 

Program

 

# W.A.S.S to covert decimal number to any other base.

 

echo "Enter the no:"

read x

echo "Enter the input base:"

read i

echo "Enter the output base:"

read o

 

echo "output no:"

echo  "ibase=$i;obase=$o;$x" | bc

 

Output

 

Enter the no:

16

Enter the input base:

10

Enter the output base:

2

output no:

10000

Posted Date: 9/26/2012 4:48:05 AM | Location : United States







Related Discussions:- Shell script to convert decimal no. to any other base no., Assignment Help, Ask Question on Shell script to convert decimal no. to any other base no., Get Answer, Expert's Help, Shell script to convert decimal no. to any other base no. Discussions

Write discussion on Shell script to convert decimal no. to any other base no.
Your posts are moderated
Related Questions
Write a script called 'prob2.m' that asks the user if they wish to clear the variables in the workspace. If the user responds with the strings 'y' or 'yes' then the workspace shoul

Write a function lastfirst() that takes a list of strings as a parameter. Each string in the list has the format ''Last, First'' where Last is a last name and First is a first nam

Write a shell script  (W.A.S.S) to calculate gross salary. Program # Write a shell script  (W.A.S.S) to calculate gross salary. echo "Enter any Basic Salary"     #echo is

Advantages of visual basic programming language Visual Basic is an exclusive selection language published by Microsoft Company, so programs published in Visible Basic cannot, e

non restoring division

Return a new picture with each pixel''s color values made up of 80% of the color values of the corresponding pixel in the first picture and 20% of the color values of the

Write a script called 'prob3.m' that does the same thing as the previous question except that it makes use of a switch-case construct instead of an if-else. In the file 'hw4.m'

LALR Parser: Rule Table - Contains definitions of production rules within the grammar. Attributes: Count - Number of production rules in the table Child items:

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

1. Write a Perl script that accepts exactly 2 integer arguments where the first argument must be less than the second argument. The script will print a comma separated list of inte