09-07-2008
Problem with writing a program
Hi guys
I'm having trouble with trying to create a script which calculates the grade of a student and the marks out of 300.
The grades are:
0-49% fail
50-59% pass
60-69% credit pass
70-79% distinction
80-100% high distinction
less than 0 or greater than 100 displays error message.
My problem is i don't know how to change the 300 into percentage form.
Here is my script that i have already made.
P.S Andrew
10 More Discussions You Might Find Interesting
1. What is on Your Mind?
Yep, that's right.
I'm writing a Linux binary that requires an X11 Server. It will also be released in a Shell, Win32, and Cocoa (Mac OS X).
It's a program that's a text editor and more. It not just creates TXT and RTF files, it also can save in XML, RSS, and a whole lot of other formats.
... (11 Replies)
Discussion started by: Danny_10
11 Replies
2. UNIX for Dummies Questions & Answers
i have written a very simple program in the vi editor, how do i now make it an executable file? (3 Replies)
Discussion started by: carlvernon
3 Replies
3. Shell Programming and Scripting
Hey guys..
I'm trying to learn how to script in bash...
THIS IS NOT AN ASSIGNMENT but my instructor says to learn you must practice
I'm trying to add to a program I'm writing that will print and save raw data...
What syntax commands would I use to write them?
And Thank you... (2 Replies)
Discussion started by: dmosheye
2 Replies
4. Shell Programming and Scripting
Can anyone create a program that
would test the math skills of the user. Assume that it would test integer addition, The program should ask the question,collect the integer response, evaluate and notify the user if their answer was correct or incorrect. I would assume integers in the range... (5 Replies)
Discussion started by: ccp
5 Replies
5. UNIX Desktop Questions & Answers
to determine if two two doubles are equal, we check to see if
their absolute difference is very close to zero. . .if two numbers
are less than .00001 apart, theyre equal.
keep a count field in each record (as you did in p5).
once the list is complete, ask the user to see if an element
is on... (2 Replies)
Discussion started by: rickym2626
2 Replies
6. Programming
Hi all,
I have an assignment from school to write a shell program in linux. the idea is to exercise fork() and execv() functions.. the shell program is supposed to be the master and every command that the user prints will run in a new process. we also need to try running the command in every... (1 Reply)
Discussion started by: r3vive
1 Replies
7. Programming
I want to write a C++ program that uses a class to do some calculations.
I pass arguments to the program, some of which are used to set up class members. A class function will then perform the necessary calculations.
I am wondering how I should pass the arguments from the program to set the... (2 Replies)
Discussion started by: kristinu
2 Replies
8. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
Basic Assignment
Write a program similar to the Unix "tee" command.
Program
The Unix "tee" command is used to pull out copies of a data stream. It is typically used in conjunction with pipes (analogous to a T-joint in plumbing, hence... (1 Reply)
Discussion started by: izzy077
1 Replies
9. Programming
Hello,
Can some one help me by writing me the script of a program that does the following simple functions on a Linux Mint:
1. it runs in the background all the time, doing nothing except of checking if there is any external device mounted.
2. when the device is detected, it copies files... (1 Reply)
Discussion started by: Black_Ardilla
1 Replies
10. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write the a shell script program to remove all space characters stored in the shell variable TEXT.... (7 Replies)
Discussion started by: kofine05
7 Replies
LEARN ABOUT CENTOS
amtapetype
AMTAPETYPE(8) System Administration Commands AMTAPETYPE(8)
NAME
amtapetype - generate a tapetype definition by testing the device directly
SYNOPSIS
amtapetype [-h] [-c] [-f] [-p] [-b blocksize] [-t typename] [-l label] [-o configoption...] [config] [device]
DESCRIPTION
amtapetype generates a tapetype entry for Amanda by testing the device directly.
OPTIONS
Note
The options for amtapetype have changed in version 2.6.1
-h
Display the help message.
-c
Run only the hardware compression detection heuristic test and stop. This takes a few minutes only.
-f
Run amtapetype even if the loaded volume is already labeled.
-p
Run only the device property discovery.
-b blocksize
block size to use with the device (default: 32k)
-t typename
Name to give to the new tapetype definition.
-l label
Label to write on the tape (default is randomly generated).
-o configoption
See the "CONFIGURATION OVERRIDE" section in amanda(8).
If a configuration is specified, it is loaded and used to configure the device. Note that global configuration parameters are not applied
to the device, so if you need to apply properties to a device to run amtapetype, you should supply those properties in a named device
section.
EXAMPLE
Generate a tapetype definition for your tape device:
% amtapetype -f /dev/nst0
NOTES
If the device cannot reliably report its comprssion status (and as of this writing, no devices can do so), hardware compression is detected
by measuring the writing speed difference of the tape drive when writing an amount of compressable and uncompresseable data. If your tape
drive has very large buffers or is very fast, the program could fail to detect hardware compression status reliably.
Volume capacity is determined by writing one large file until an error, interpereted as end-of-tape, is encountered. In the next phase,
about 100 files are written to fill the tape. This second phase will write less data, because each filemark consumes some tape. With a
little arithmetic, amtapetype calculates the size of these filemarks.
All sorts of things might happen to cause the amount of data written to vary enough to generate a strange file mark size guess. A little
more "shoe shining" because of the additional file marks (and flushes), dirt left on the heads from the first pass of a brand new tape, the
temperature/humidity changed during the multi-hour run, a different amount of data was written after the last file mark before EOT was
reported, etc.
Note that the file mark size might really be zero for whatever device this is, and it was just the measured capacity variation that caused
amtapetype to think those extra file marks in pass 2 actually took up space.
SEE ALSO
amanda(8), amanda.conf(5)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHORS
Dustin J. Mitchell <dustin@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Jean-Louis Martineau <martineau@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Amanda 3.3.3 01/10/2013 AMTAPETYPE(8)