0
algorithm
algorithm that will input a number then output the word C# that many times
2 Antworten
+ 4
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
int x = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < x; i++) {
Console.WriteLine("C#");
}
}
}
}
//Now What?
0
Well it's a good code but you seem to mixing up what a code means an algorithm.
To clear things up algorithms are just steps to attain solution to task
While codes are instructions explicitly written according to a programming language syntax to implement the algorithm.