algorithm | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

algorithm

algorithm that will input a number then output the word C# that many times

11th Aug 2016, 8:20 AM
Oneil
Oneil - avatar
2 Answers
+ 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?
11th Aug 2016, 11:23 AM
Alireza M
Alireza M - avatar
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.
13th Aug 2016, 2:14 AM
Animashaun Abdul Azeem
Animashaun Abdul Azeem - avatar