26.08.2014 Views

C# e Orientação a Objetos

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RESPOSTAS<br />

A P Ê N D I C E<br />

B<br />

Resposta do Exercise 2.1<br />

Adicione o seguinte arquivo na pasta logica.<br />

1 class ImprimePadrao3<br />

2 {<br />

3 static void Main ()<br />

4 {<br />

5 string linha = "*";<br />

6 for ( int contador = 1; contador csc ImprimePadrao3 .cs<br />

Microsoft (R) Visual <strong>C#</strong> 2010 Compiler version 4.0.30319.1<br />

Copyright (C) Microsoft Corporation . All rights reserved .<br />

C:\ Users \K19\ Documents \ Marcelo \logica > ImprimePadrao3 . exe<br />

*<br />

**<br />

***<br />

****<br />

*****...<br />

Terminal 2.10: Padrão 3<br />

Resposta do Exercise 2.2<br />

Adicione o seguinte arquivo na pasta logica.<br />

1 class ImprimePadrao4<br />

2 {<br />

3 static void Main ()<br />

4 {<br />

5 string linha = "*";<br />

6 for ( int contador = 1; contador

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!