Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console.WriteLine("RAJZOLJUNK TRIANGLÉT");
- Console.WriteLine("Mekkora legyen a téglalap alapja ?");
- int alap2 = int.Parse(Console.ReadLine());
- Console.WriteLine("Mekkora legyen a téglalap magassága ?");
- int magassag2 = int.Parse(Console.ReadLine());
- Console.WriteLine();
- Console.Clear();
- Console.ForegroundColor = ConsoleColor.Yellow;
- for (int k = 1; k <= alap2; k++)
- {
- for (int j = 1; j <= k; j++)
- {
- Console.Write("*");
- }
- Console.WriteLine();
- }
- for (int k = 1; k <= alap2; k++)
- {
- for (int j = 1; j <= alap2-k; j++)
- {
- Console.Write(" ");
- }
- for (int j = 1; j <= k; j++)
- {
- Console.Write("*");
- }
- Console.WriteLine();
- }
- Console.WriteLine("PITAGORASZI ÖSSZEFÜGGÉS A2+B2=C2 szóval a háromszög átfogója : {0}", (alap2 * alap2) + (magassag2 * magassag2));
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement