using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sav { class Program { static void Main(string[] args) { char simbolis; int k; int x; int a = 0; Console.Write("iveskite norima kieki: "); k = int.Parse(Console.ReadLine()); Console.Write("iveskite simboliu kieki eiluteje: "); x = int.Parse(Console.ReadLine()); Console.Write("Įveskite spausdinamą simbolį: "); simbolis = (char)Console.Read(); a = k / x; int b = k % x; for (int i = 1; i <= a; i++) { for (int j = 1; j<=x; j++) { Console.Write(simbolis); } Console.WriteLine(); } if ( b > 0) { Console.Write(simbolis); } } } }
a
b
j
x
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)