#include <stdio.h> main() { float real,user,sys,addition,entry,average; float entries; int i; addition=0; printf(“\n Entries\n”); scanf(“%f”,&entries); for (i=0;i<entries;i++) { printf("\n Entry\n"); scanf("%f",&entry); addition=addition+entry; } average=addition/entries; printf ("\nAverage Equals %f",average); }
Author Archives: jeffrin
sourceinstall tune.1
1. libX11-1.1.5 2. windowswmproto-1.0.3 3. libWindowsWM-1.0.0 4. xvidcap-1.1.7 5. libXmu-1.0.4 6. libXext-1.0.4 7. libXt-1.0.5 Average Equals 11.868286 seconds [system time]
free.c
/* Work around incompatibility on older systems where free (NULL) fails. Copyright (C) 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later …
flock
http://en.wikipedia.org/wiki/File_locking#Linux http://www.thinkage.ca/english/gcos/expl/c/lib/fileno.html
flock [-sxon] [-w timeout] lockfile [-c] command…
http://en.wikipedia.org/wiki/File_locking#Linux http://www.thinkage.ca/english/gcos/expl/c/lib/fileno.html
mkdir.c
/* On some systems, mkdir (“foo/”, 0700) fails because of the trailing slash. On those systems, this wrapper removes the trailing slash. Copyright (C) 2001, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the …
Create the DIRECTORY(ies), if they do not already exist
source code /* On some systems, mkdir (“foo/”, 0700) fails because of the trailing slash. On those systems, this wrapper removes the trailing slash. Copyright (C) 2001, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published …
Continue reading “Create the DIRECTORY(ies), if they do not already exist”
times
times Print the accumulated user and system times for the shell and for processes run from the shell. The return status is 0. ftp://ftp.cwru.edu/pub/bash/bash-4.1.tar.gz
split
split – split a file into pieces.
Example of split – split a file into pieces
$split -C 3 split-ex.txt $ls xa xaa xab xac xad xae xaf xag xah xai xaj $cat xab 2 $cat xac 3 $cat xaj 0 $cat xai 9 $cat xaa 1 $cat split-ex.txt 1 2 3 4 5 6 7 8 9 0 $rm xa xaa xab xac xad xae xaf xag xah xai xaj …
Continue reading “Example of split – split a file into pieces”