mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-23 07:29:02 -08:00
15 lines
435 B
C#
15 lines
435 B
C#
using System;
|
|
|
|
Console.WriteLine(Tab(30) + "Sine Wave");
|
|
Console.WriteLine(Tab(15) + "Creative Computing Morristown, New Jersey\n\n\n\n\n");
|
|
|
|
bool isCreative = true;
|
|
for (double t = 0.0; t <= 40.0; t += 0.25)
|
|
{
|
|
int a = (int)(26 + 25 * Math.Sin(t));
|
|
string word = isCreative ? "Creative" : "Computing";
|
|
Console.WriteLine($"{Tab(a)}{word}");
|
|
isCreative = !isCreative;
|
|
}
|
|
|
|
static string Tab(int n) => new string(' ', n); |