08-23-2007
how i display number in words
helo i want to implement the following concept in my project
write a c/c++ algorithm for : accept a number from the user not greater than 6 digits and display the number in words i.e. if the input from the user is 18265 then the output should be Eighteen Thousand Two Hundred Sixty Five. if the input it 1187293 then the output should be Eleven Lac Eighty Seven Thousand Two Hundred Ninety Three.
how i iplement this
Regards,
Amit
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need Display the most top 10 occurring words along with the number of occurences of those words in the given text.
Sample text as below:
"The Travails of Single South Indian men of conservative upbringing" or "Why we don't get any..."
Yet another action packed weekend in Mumbai, full of... (2 Replies)
Discussion started by: smacherla
2 Replies
2. Shell Programming and Scripting
Using sed or awk, I need to display text between two words/characters. Below are two example inputs and the desired output. In a nutshell, I need the date-range value between the quotes (but only the first occurance of date-range as there can be more than one).
Example One Input:
xml-report... (1 Reply)
Discussion started by: cmichaelson
1 Replies
3. Shell Programming and Scripting
please
help me for this
"divide the file into multiple files containing no more than 50 lines each and find the number of words of length less than 5 characters" (3 Replies)
Discussion started by: annapurna konga
3 Replies
4. Shell Programming and Scripting
Dear all
I am trying to divide a file using the number of words as a condition. Alternatively, I would at least like to be able to retrieve the first x words of a given file. Any tips?
Thanks in advance. (7 Replies)
Discussion started by: aavv
7 Replies
5. UNIX Desktop Questions & Answers
well, i am so not familiar with this kind of things but i am gonna explain extactly what i am looking for so hopfully someone can figure it out :)
i have a command that shows memory usage besides the process name, for example(the command output):
500 kb process_1
600 kb process_2
700 kb... (4 Replies)
Discussion started by: Portabello
4 Replies
6. UNIX for Dummies Questions & Answers
Hi Guys,
I was going some trial and error to see if I can find the longest word in a text.
I was using Pipes because they are easier to use in this case.
I was stuck on this for a while so I thought I'll get some help with it.
I tried this code to separate all the words in a text in... (4 Replies)
Discussion started by: bawse.c
4 Replies
7. Shell Programming and Scripting
I am having a file with duplicate words how can I eliminate them
ant,bat
bat,cat
cat a.txt | grep -bat | awk '{print $1}'
expecting o/p as ant,bat,cat
How can I display the output as ant,bat,cat in a single line and no duplicates exists. (2 Replies)
Discussion started by: shikshavarma
2 Replies
8. Shell Programming and Scripting
I want to sort a file with a list of words, in order of most occuring words to least occurring words as well as alphabetically.
ex:
file1:
cat 3
cat 7
cat 1
dog 3
dog 5
dog 9
dog 1
ape 4
ape 2
I want the outcome to be:
file1.sorted:
dog 1 (12 Replies)
Discussion started by: castrojc
12 Replies
9. Shell Programming and Scripting
Hi ,
I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Discussion started by: jmarx
1 Replies
10. UNIX for Beginners Questions & Answers
awk 'BEGIN{print "<table>"} {print "<tr>";
for ( i=1;i<NF;i++) print " <td>" $I "</td>";
print "</tr>"}
END{print " </table>"}' <file name > (6 Replies)
Discussion started by: Himanshu1
6 Replies
LEARN ABOUT NETBSD
orders
ORDERS(7) BSD Miscellaneous Information Manual ORDERS(7)
NAME
orders -- orders of magnitude
DESCRIPTION
The following table lists common multiples of bytes.
Name Prefix Power of 2 Power of 10
Kilobyte kB 2^10 10^3
Megabyte MB 2^20 10^6
Gigabyte GB 2^30 10^9
Terabyte TB 2^40 10^12
Petabyte PB 2^50 10^15
Exabyte EB 2^60 10^18
Zettabyte ZB 2^70 10^21
Yottabyte YB 2^80 10^24
The following table lists common bit rates as a power of ten.
Name Prefix Bit per second Byte per second
Bit per second bit/s 1 0.125
Byte per second B/s 8 1
Kilobit per second kbit/s 10^3 125
Kilobyte per second kB/s 8 * 10^3 1000
Megabit per second Mbit/s 10^6 125000
Megabyte per second MB/s 8 * 10^6 1000000
Gigabit per second Gbit/s 10^9 125000000
Gigabyte per second GB/s 8 * 10^9 1000000000
Terabit per second Tbit/s 10^12 125000000000
Terabyte per second TB/s 8 * 10^12 1000000000000
The following table lists common orders of magnitude as a power of ten.
Name Order Prefix Symbol Decimal
Septillionth 10^-24 yocto y 0.000000000000000000000001
Sextillionth 10^-21 zepto z 0.000000000000000000001
Quintillionth 10^-18 atto a 0.000000000000000001
Quadrillionth 10^-15 femto f 0.000000000000001
Trillionth 10^-12 pico p 0.000000000001
Billionth 10^-9 nano n 0.000000001
Millionth 10^-6 micro mu 0.000001
Thousandth 10^-3 milli m 0.001
Hundredth 10^-2 centi c 0.01
Tenth 10^-1 deci d 0.1
One 10^0 - - 1
Ten 10^1 deca da 10
Hundred 10^2 hecto h 100
Thousand 10^3 kilo k 1000
Million 10^6 mega M 1000000
Billion 10^9 giga G 1000000000
Trillion 10^12 tera T 1000000000000
Quadrillion 10^15 peta P 1000000000000000
Quintillion 10^18 exa E 1000000000000000000
Sextillion 10^21 zetta Z 1000000000000000000000
Septillion 10^24 yotta Y 1000000000000000000000000
SEE ALSO
units(1), strsuftoll(3), number(6)
STANDARDS
There have been various attempts to standardize the set of binary prefixes. Organizations such as International Electrotechnical Commission
(IEC) have proposed new prefixes such as ``kibi'', ``mebi'', ``gibi'', and ``yobi'', but the adoption has been slow at best.
BSD
August 6, 2011 BSD