🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #998

Re: Taming The Switch-Statement

#998
From: Rosario19
Date: Thu, 29 Oct 2026 07:38
17 lines
2004 bytes
On Thu, 29 Oct 2026 08:30:33 +0100, Rosario19  wrote:

>for(x=1;x<20;++x)
>  {if(x%2==0) printf("%d divides by 2\n",x);
>   if(x%3==0) printf("%d divides by 3\n",x);
>   if(x%3!=0&&x%2!=0)
>           printf("%d no divides (by 3 or 2)\n",x);
>  }


int y,x=0;
label:
y=1;++x;
if(x%2==0) {printf("%d divides by 2\n",x);y=0;}
if(x%3==0) {printf("%d divides by 3\n",x);y=0;}
if(y)printf("%d no divides (by 3 or 2)\n",x);
if(x<20)goto label;
Technical Details
Message-ID: <4mt5el592m8ibmgik0fsdg28i29kvpuo6i@4ax.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <119qf6l$2rmg3$1@dont-email.me> <11ba02r$3pl5h$1@dont-email.me> <11bnfpm$i84l$1@dont-email.me> <11bng23$iblc$1@dont-email.me> <11bngj1$ifj5$1@dont-email.me> <11bnnbg$l7i1$1@dont-email.me> <11bntk0$nsbo$1@dont-email.me> <11bnvbq$olbj$1@dont-email.me> <11bo02r$otr5$1@dont-email.me> <11bo0ul$pbso$1@dont-email.me> <11bo1bc$phlr$1@dont-email.me> <tft5elp1q2ns7rhfp3rod862ks5ip3p0ms@4ax.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Rosario19 <Ros@invalid.invalid>
Newsgroups: comp.lang.c
Subject: Re: Taming The Switch-Statement
Date: Thu, 29 Oct 2026 08:38:06 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <4mt5el592m8ibmgik0fsdg28i29kvpuo6i@4ax.com>
References: <119qf6l$2rmg3$1@dont-email.me> <11ba02r$3pl5h$1@dont-email.me> <11bnfpm$i84l$1@dont-email.me> <11bng23$iblc$1@dont-email.me> <11bngj1$ifj5$1@dont-email.me> <11bnnbg$l7i1$1@dont-email.me> <11bntk0$nsbo$1@dont-email.me> <11bnvbq$olbj$1@dont-email.me> <11bo02r$otr5$1@dont-email.me> <11bo0ul$pbso$1@dont-email.me> <11bo1bc$phlr$1@dont-email.me> <tft5elp1q2ns7rhfp3rod862ks5ip3p0ms@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 29 Oct 2026 07:30:12 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3295406"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19iNOdTkZWU+TiXBc/BhCle8y6bQjUioXo="; posting-host="7cd7d0c5bc9169077a92d3388a16dbd9"
Cancel-Lock: sha1:jlRopuqXMi0x2mdXxJ3VoLpSLOU= sha256:i13pwZtoSEtrwpCHttEIJig5MdxtxNZiF8y2ISq3hKQ=
	sha1:9tLe0yFt9wg44OF1+1vLHfXcEU8= sha256:tey8hTQwhkl2oUF/4Xn0fXwukqR6LEojNawPUshLJ20=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)