From owner-freebsd-questions@FreeBSD.ORG Tue Oct 23 21:43:36 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A3A716A417 for ; Tue, 23 Oct 2007 21:43:36 +0000 (UTC) (envelope-from h.schmalzbauer@omnisec.de) Received: from host.omnisec.de (host.omnisec.de [62.245.232.135]) by mx1.freebsd.org (Postfix) with ESMTP id 2B14413C4B2 for ; Tue, 23 Oct 2007 21:43:35 +0000 (UTC) (envelope-from h.schmalzbauer@omnisec.de) Received: from [192.168.1.69] (e181014057.adsl.alicedsl.de [85.181.14.57]) (authenticated bits=0) by host.omnisec.de (8.13.8/8.13.8) with ESMTP id l9NLhLco044790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 23 Oct 2007 23:43:22 +0200 (CEST) (envelope-from h.schmalzbauer@omnisec.de) X-Authentication-Warning: smtp.dmz.omnisec.de: Host e181014057.adsl.alicedsl.de [85.181.14.57] claimed to be [192.168.1.69] From: Harald Schmalzbauer Organization: OmniSEC To: freebsd-questions@freebsd.org Date: Tue, 23 Oct 2007 23:43:19 +0200 User-Agent: KMail/1.9.7 References: <200710232044.53240.h.schmalzbauer@omnisec.de> <20071023162454.93851854.wmoran@potentialtech.com> <200710232324.09851.h.schmalzbauer@omnisec.de> In-Reply-To: <200710232324.09851.h.schmalzbauer@omnisec.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200710232343.20307.h.schmalzbauer@omnisec.de> Subject: Re: Mentor for C self study wanted X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2007 21:43:36 -0000 Am Dienstag, 23. Oktober 2007 23:24:09 schrieb Harald Schmalzbauer: [*snip*] > > Although, you'll have to include your code inline to get past the > > sanitizers. > > Thanks all, > > here was my example, just for completeness, I found mentors for my needs. > > Thanks a lot to all! > > > #include > > void main() > { > short nnote; > > // Numerischen Notenwert einlesen > printf("Bitte numerischen Schulnotenwert eingeben: "); > scanf("%d",&nnote); > > switch (nnote) > { > case 1: printf("Die Note %d entspricht sehr gut.",nnote); > break; [snip] > default: printf("%d ist keine zul=E4ssige Schulnote!"); > } > printf("\n"); > } > > P.S.: > I found that declaring nnote as int soleves my problem, but I couldn=C4t > understand why. > Another one was the result of default: nnote was -1077942208 instead of 9 > for example. Ok, the last one is a "typo", I forgot ...ote!",%d);. But interesting that ther's some output. Constant output....