🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #21551

Re: Pytanie 3 - dlaczego nie dodaje i nie zwieksza integera?

#21551
From: 3P
Date: Thu, 03 Jun 2010 15:24
43 lines
2064 bytes
Dnia 03-06-2010 o 12:24:59 topek  
<topek-sp*merom-czlon-w-zad@p0st.pl_zamien_zero_na_o> napisał(a):

> Wlasnie napisalem program:
>
> using System;
> using System.Collections.Generic;
> using System.Linq;
> using System.Text;
>
> namespace How_Integer_Could_Be_High
> {
>      class How_Integer_Could_Be_High
>      {
>          static void Main()
>          {
>              int X = 2;
>              Console.WriteLine(X);
>              Console.WriteLine(X * X);
>              Console.WriteLine(X * X);
>              Console.WriteLine(X * X);
>              Console.WriteLine(X * X);
>              Console.WriteLine(X * X);
>              Console.WriteLine(X * X);
>              Console.WriteLine(X * X);
>              Console.WriteLine(X * X);
>              Console.WriteLine(X * X);
>          }
>      }
> }
>
> Wedlu Pana Petzolda i jego ksiazki "Programing in the Key...",  
> powinienem dac taki wynik:
>
> 2, 4, 16, 256, 65536, 0, 0, 0, 0
>
> A moj daje
> 2, 4, 4, 4, 4, 4
>
> Program jest napewno dobrze przepisany :)

Czy aby napewno?. Może twoje oczy nie zauważyły, że tam jest napisane
Console.WriteLine(X *= X);
Technical Details
Message-ID: <op.vdqc3wwhmsp0fz@mcs>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!news.nask.pl!news.nask.org.pl!news.onet.pl!not-for-mail
References: <4c077bba$1@news.home.net.pl> <4c078301$1@news.home.net.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!news.nask.pl!news.nask.org.pl!news.onet.pl!not-for-mail
From: 3P <nospam@serwer.pl>
Newsgroups: alt.pl.comp.lang.csharp
Subject: Re: Pytanie 3 - dlaczego nie dodaje i nie zwieksza integera?
Date: Thu, 03 Jun 2010 17:24:58 +0200
Organization: http://onet.pl
Lines: 43
Message-ID: <op.vdqc3wwhmsp0fz@mcs>
References: <4c077bba$1@news.home.net.pl> <4c078301$1@news.home.net.pl>
NNTP-Posting-Host: plastcom.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1275578702 18206 83.238.46.138 (3 Jun 2010 15:25:02 GMT)
X-Complaints-To: niusy@onet.pl
NNTP-Posting-Date: Thu, 3 Jun 2010 15:25:02 +0000 (UTC)
User-Agent: Opera Mail/10.53 (Win32)
X-Antivirus: avast! (VPS 100603-0, 2010-06-03), Outbound message
X-Antivirus-Status: Clean
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit