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 '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'

On-line fair and ethical share trading system (Olfest) A system is required that allows on-line customers to buy and sell stock market shares in a selection of companies. B

In analytical geometry, a convex polygon can be represented by the Cartesian coordinates of its vertices, x and y. Assume such data of a polygon are stored in a file called "vertic

Design and implement a stringed musical instrument class using the following guidelines: a. Data fields for your instrument should include number of strings, an array of stri

Improved Application Deployment Data source implementation is perhaps the key to any Asp.net program implementation, and, if the database implementation is easily done, there is an

Flatten the tree Consider the following XML input, which groups people into two categories-salaried and hourly: Warren Rosenbaum 37 5.75

Write a program to read a text file and create a dictionary. The keys for the dictionary should be all 26 letters of the alphabet and the values of the dictionary should be the lis

A non-empty string is called a minimal unique substring of s if and only if it satisfies: (i) α occurs exactly once in s (uniqueness), (ii) all proper prefixes of occur at le

Translate the following formula into a prefix form expression in Scheme: Question 2 Define a procedure that takes three numbers as arguments and returns the sum of the squ

How Can I Retrive Unicode CSV File the ADO.net VB.net