Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _5_JavaCup
- {
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int width = 3 * n + 6;
- // Steam
- for (int i = 0; i < n; i++)
- {
- Console.WriteLine(new string(' ', n) + "~ ~ ~");
- }
- // Top of The Cup
- Console.WriteLine(new string('=', width - 1));
- int tilda = width - (n + 2);
- // Part with JAVA Logo
- for (int i = 1; i <= n - 2; i++)
- {
- if (i == n / 2)
- {
- tilda = tilda / 2 - 2;
- Console.WriteLine("|" + new string('~', tilda) + "JAVA" + new string('~', tilda) + "|" + new string(' ', n - 1) + "|");
- }
- else
- {
- tilda = width - (n + 2);
- Console.WriteLine("|" + new string('~', tilda) + "|" + new string(' ', n - 1) + "|");
- }
- }
- Console.WriteLine(new string('=', width - 1));
- // Botoom Part
- int ampersant = tilda;
- int spaces = 0;
- for (int i = 0; i < n; i++)
- {
- Console.WriteLine(new string(' ', spaces) + "\\" + new string('@', ampersant) + "/" + new string(' ', spaces));
- spaces++;
- ampersant -= 2;
- }
- int equal = tilda + 2;
- Console.WriteLine(new string('=', equal));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement