08-26-2007
Quote:
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
accept number from user not greater than 6 digits
no of digits in the second input is greater than that. !!!
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
shadow(4) Kernel Interfaces Manual shadow(4)
NAME
shadow - shadow password file
SYNOPSIS
DESCRIPTION
The file is created from the file by the command. It is readable only by a privileged user. It can be modified by the and commands. Pro-
grams may use the interfaces described in the getspent(3C) manpage to access this information. These functions return a pointer to an
structure, which is defined in the header file.
Fields
The file is an ASCII file consisting of any number of user entries separated by newlines. Each user entry line consists of the following
fields separated by colons:
login name Each login name must match a login name in puts the user entries in in the same order as the entries.
encrypted password
The password field of each entry contains an "x", and the actual encrypted passwords reside in The encrypted password field
consists of 13 characters chosen from a 64-character set of "digits". The characters used to represent "digits" are for 0,
for 1, through for 2 through 11, through for 12 through 37, and through for 38 through 63.
If the SHA11i3 product is installed, the password field may contain the prefix , where n is a label identifying an alterna-
tive algorithm used for the password hash. Using the new algorithm results in an encrypted password field which is longer
than 13 characters. The password field will consist of digits from the same 64-character set, as well as the additional
character used as a delimiter.
If this field is null, then there is no password and no password is demanded on login. Login can be prevented by entering a
character that is not a part of the set of digits (such as *).
last change
The number of days since January 1, 1970 that the password was last modified.
min days
The minimum period in days that must expire before the password can be changed. See also in security(4) and the command in
passwd(1).
max days
The maximum number of days for which a password is valid. A user who attempts to login after his password has expired is
forced to supply a new one. If min days and max days are both zero, the user is forced to change his password the next time
he logs in. If min days is greater than max days, then the password cannot be changed. These restrictions do not apply to
the superuser. See also in security(4) and the command in passwd(1).
warn days
The number of days the user is warned before his password expires. See also in security(4) and the command in passwd(1).
inactivity
The maximum number of days of inactivity allowed. This field is set with the option of either the or command. If this value
is greater than zero, then the account is locked if there have been no logins to the account for at least the specified num-
ber of days. If this value is less than or equal to zero, the value is determined by the attribute. See the description of
in security(4).
expiration
The absolute number of days since Jan 1, 1970 after which the account is no longer valid. A value of zero in this field
indicates that the account is locked.
reserved
The reserved field is always zero and is reserved for future use.
Notes
The file is not applicable to a system which has been converted to a trusted system.
WARNINGS
HP-UX 11i Version 3 is the last release to support trusted systems functionality.
FILES
system password file
shadow password file
SEE ALSO
login(1), passwd(1), pwconv(1M), pwunconv(1M), useradd(1M), userdel(1M), usermod(1M), crypt(3C), getspent(3C), putspent(3C), nss-
witch.conf(4), passwd(4), security(4).
shadow(4)