This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TelerikExamples { | |
class FireInTheMatrix { | |
static void Main() { | |
int fireWidth = int.Parse(Console.ReadLine()); | |
int sideDots = (fireWidth - 2) / 2; | |
int middleDots = 0; | |
for (int i = sideDots; i >= 0; i--) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module SandGlass | |
Sub Main() | |
Dim n = Integer.Parse(Console.ReadLine()) | |
Dim stars As Integer = n + 2 | |
Dim add As Boolean = False | |
For i As Integer = 1 To n | |
If stars = 1 Then | |
add = True | |
End If | |
stars = If(add = False, stars - 2, stars + 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module FirTree | |
Sub main() | |
Dim height As Integer = Integer.Parse(Console.ReadLine()) | |
Dim width As Integer = 1 | |
For i As Integer = 2 To height - 1 | |
width += 2 | |
Next i | |
Dim asterisk As Integer = -1 | |
Dim point As Integer = 0 | |
For i = 1 To height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module Tribonacci | |
Sub main() | |
Dim T1 As Integer = Integer.Parse(Console.ReadLine()) | |
Dim T2 As Integer = Integer.Parse(Console.ReadLine()) | |
Dim T3 As Integer = Integer.Parse(Console.ReadLine()) | |
Dim N As Integer = Integer.Parse(Console.ReadLine()) | |
Dim i As Integer = 4 | |
Dim nextMember As Integer = 0 | |
While i <= N | |
nextMember = T1 + T2 + T3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module Tribonacci | |
Sub main() | |
Dim T1 As Integer = Integer.Parse(Console.ReadLine()) | |
Dim T2 As Integer = Integer.Parse(Console.ReadLine()) | |
Dim T3 As Integer = Integer.Parse(Console.ReadLine()) | |
Dim N As Integer = Integer.Parse(Console.ReadLine()) | |
Dim T(N - 1) As Integer | |
T(0) = T1 | |
T(1) = T2 | |
T(2) = T3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TelerikExamples { | |
class CoffeeVendingMachine { | |
static void Main() { | |
short i; | |
short j; | |
short[] coinsNumber = new short[5]; | |
decimal[] coinsValue = { | |
0.05 M, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TelerikExamples { | |
class DrunkenNumbers { | |
static void Main() { | |
// брой рундове - прочита се от конзолата | |
byte rounds = byte.Parse(Console.ReadLine()); | |
// спечелени точки (една изпита бира = една точка) | |
int vladkoScore = 0; | |
int mitkoScore = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TelerikExamples | |
{ | |
class Garden | |
{ | |
static void Main() | |
{ | |
decimal[] seedsCosts = {0.5M, 0.4M, 0.25M, 0.6M, 0.3M, 0.4M}; | |
decimal totalCosts = 0M; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace TelerikExamples | |
{ | |
class BatGoikoTower | |
{ | |
static void Main() | |
{ | |
int towerHeight = int.Parse(Console.ReadLine()); | |
int currentDashIndex = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.Drawing | |
Module ShipDamage | |
Sub Main() | |
' вход на данни | |
Dim line(10) As Integer | |
For i As Integer = 0 To line.Length - 1 | |
line(i) = Integer.Parse(Console.ReadLine()) | |
Next i | |
' дефиниране на правоъгълник, | |
' с начало долен ляв ъгъл (1) и посока обратна на часовниковата стрелка, |
NewerOlder