🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.misc
Article #4

Re: Algorithmus gesucht

#4
From: Matthias Urlichs
Date: Fri, 31 Jul 1992 15:56
37 lines
1459 bytes
In de.comp.lang.misc, article <TsFjr*Uf0@forge.erh.sub.org>,
  barnard@forge.erh.sub.org (Henning Schmiedehausen) writes:
> In article <HsJgNB1w165w@joker.wes.open.de>, Jochen Erwied writes:
> 
> Usage: saison <anzahl der Teams>
> 
> #include <stdio.h>
> 
> main(argc,argv)
> int     argc;
> char  *argv[];
>   {
> 
> int     team;
> int     oppo;
> int     nof;
> int     spieltag;
> int     plays[31];
> int     place[31];
> 
> 
>   nof = atoi(argv[1]);
> 
>   if(nof < 2 || nof > 30)
>     {
>     printf("Anzahl der Teams muss >=2 und <= 30 sein: %d\n",nof);
>     exit(10);
>     }
> 
Aeh -- ich will ja nicht meckern, aber schon mal was von malloc() gehoert?
Oder von einem Testen von argv auf == 2? 

-- 
"He flung himself on his horse and rode madly off in all directions"
-- 
Matthias Urlichs  --  urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de   /(o\
Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany  --  +49-721-9612521     \o)/
Technical Details
Message-ID: <15bns1INNa8n@smurf.smurf.sub.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!smurf.sub.org!news
References: <HsJgNB1w165w@joker.wes.open.de> <TsFjr*Uf0@forge.erh.sub.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!smurf.sub.org!news
From: urlichs@smurf.sub.org (Matthias Urlichs)
Newsgroups: de.comp.lang.misc,de.comp.lang.c
Subject: Re: Algorithmus gesucht
Date: 31 Jul 1992 17:56:49 +0200
Organization: University of Karlsruhe, FRG
Lines: 37
Message-ID: <15bns1INNa8n@smurf.smurf.sub.org>
References: <HsJgNB1w165w@joker.wes.open.de> <TsFjr*Uf0@forge.erh.sub.org>
NNTP-Posting-Host: 127.0.0.1