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
Question: (i) Each time a security mechanism is installed or deleted in a Digital UNIX system, SIA is involved. Draw a Security Integration Architecture diagram. (ii) How

You must programme an analogue clock and digital stopwatch using the Processing programming language

Write a program to use a robot to move the stack of blocks from a source location to a target location, based. Movement of robot arms, picking and dropping, can be controlled usi

about how to create the program in c

What will be the output for the following instruction if CX=9087H and AX=9090H? 1) BTR AH,2? 10010000=10010000 2) BTC CX,9?1001000010000111=1001000110000111 3) NEG AX?

Write a function called triple (in a file called 'triple.m'). That takes a single variable x and returns a single variable in which every element of x is multiplied by 3. Make sure

How to i write a car rental program in jgrasp

Write a Perl script that prints the contents of a file Write a Perl script that prints the contents of a file, prefixing each line with a line number. The script should acc

The Maze Game from Laboratory 7 loads its maze directly in the program's code. This should be avoided as it requires the program to be recreated if the maze needs to be changed. In

Support for Multi-Targeting The multi-targeting function of Vision Facilities allows you specify the particular edition or account of the .NET Structure that is required for your p