Simplfy SineWave (C#) folder structure

This commit is contained in:
Zev Spitz
2022-01-17 08:37:17 +02:00
parent d901e48f24
commit 79c04373f4
3 changed files with 5 additions and 5 deletions

View File

@@ -0,0 +1,15 @@
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);