Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- internal class Program
- {
- private static void Main(string[] args)
- {
- // int suma = Sumuj(5, 10 ,15);
- // System.Console.WriteLine(suma);
- // // .....
- // System.Console.WriteLine(Sumuj(3,5,7));
- RysujProstokat(10,5);
- System.Console.WriteLine();
- RysujProstokat(10,5,"O");
- }
- static void RysujProstokat(int szerokosc, int wysokosc, string znak="#")
- {
- for (int wiersz = 0; wiersz<wysokosc; wiersz++)
- {
- for (int kolumna=0; kolumna<szerokosc; kolumna++ )
- {
- Console.Write(znak);
- }
- Console.WriteLine();
- }
- }
- static void RysujPustyProstokat(int szerokosc, int wysokosc, string znak="#")
- {
- for (int wiersz = 0; wiersz<wysokosc; wiersz++)
- {
- for (int kolumna=0; kolumna<szerokosc; kolumna++ )
- {
- Console.Write(znak);
- }
- Console.WriteLine();
- }
- }
- static int Sumuj(int liczba1, int liczba2, int liczba3)
- {
- int suma = liczba1+ liczba2 + liczba3;
- return suma;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement