Sponsored Content
Full Discussion: Need a little help
Top Forums UNIX for Dummies Questions & Answers Need a little help Post 302878755 by iGakki on Sunday 8th of December 2013 07:13:12 PM
Old 12-08-2013
Need a little help

thx for reading first, i got some problems with my assignment,
this is the requirements of my assignment:
The program calculates and displays the largest and average of a group of input numbers.
The program should accept the input of a group of numbers, one at a time, each can be up to 2 digits, ended with a 0, and find and display the largest and the average of all valid input numbers (excluding the ending zero). For example, input of 46, -31, 6, 10, 12345, -4, 274 and 0 should result in 46 as the largest and the average of 5, with error messages indicating that 12345 and 274 are invalid.
Any invalid input character (eg. #, a, %, A, etc.) or number exceeding the range should cause an error message and be ignored.

my question is we didnt learn anything about the data type in unix yet, but i find some similar assignment they all use "@", what is "@" means in unix and is there any other ways to deal with this problem but not use "@"
regards~
 
qmail-users(5)							File Formats Manual						    qmail-users(5)

NAME
qmail-users - assign mail addresses to users OVERVIEW
The file /var/lib/qmail/users/assign assigns addresses to users. For example, =joe.shmoe:joe:503:78:/home/joe::: says that mail for joe.shmoe should be delivered to user joe, with uid 503 and gid 78, as specified by /home/joe/.qmail. Assignments fed to qmail-newu will be used by qmail-lspawn to control qmail-local's deliveries. See qmail-newu(8). A change to /var/lib/qmail/users/assign will have no effect until qmail-newu is run. STRUCTURE
/var/lib/qmail/users/assign is a series of assignments, one per line. It ends with a line containing a single dot. Lines must not contain NUL. SIMPLE ASSIGNMENTS
A simple assignment is a line of the form =local:user:uid:gid:homedir:dash:ext: Here local is an address; user, uid, and gid are the account name, uid, and gid of the user in charge of local; and messages to local will be controlled by homedir/.qmaildashext. If there are several assignments for the same local address, qmail-lspawn will use the first one. local is interpreted without regard to case. WILDCARD ASSIGNMENTS
A wildcard assignment is a line of the form +loc:user:uid:gid:homedir:dash:pre: This assignment applies to any address beginning with loc, including loc itself. It means the same as =locext:user:uid:gid:homedir:dash:preext: for every string ext. A more specific wildcard assignment overrides a less specific assignment, and a simple assignment overrides any wildcard assignment. For example: +:alias:7790:2108:/var/lib/qmail/alias:-:: +joe-:joe:507:100:/home/joe:-:: =joe:joe:507:100:/home/joe::: The address joe is handled by the third line; the address joe-direct is handled by the second line; the address bill is handled by the first line. SEE ALSO
qmail-pw2u(8), qmail-newu(8), qmail-lspawn(8) qmail-users(5)
All times are GMT -4. The time now is 03:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy