0

Help me with this code coach

It fails all test cases Here is the code using System.Collections.Generic; namespace SoloLearn { class Program { static void Main(string[] args) { int n = Convert.ToInt32(Console.ReadLine()); //your code goes here if (n%3 == 0) { Console.WriteLine("*"); } else { Console.WriteLine(n); } } } }

16th Dec 2020, 7:17 PM
🥇👩‍💻 Kintu Michael Evans 🔥🔥( Active)
🥇👩‍💻 Kintu Michael Evans 🔥🔥( Active) - avatar
4 Réponses
+ 2
🥇👩‍💻 Kintu Michael Evans 🔥🔥 Check this condition inside loop. for(int i = 1; i <= n; i++) { if(i % 3 == 0) //*; else //i; }
16th Dec 2020, 7:21 PM
A͢J
A͢J - avatar
+ 1
16th Dec 2020, 7:24 PM
A͢J
A͢J - avatar
0
Help me to spot a mistake
16th Dec 2020, 7:23 PM
🥇👩‍💻 Kintu Michael Evans 🔥🔥( Active)
🥇👩‍💻 Kintu Michael Evans 🔥🔥( Active) - avatar
0
🥇👩‍💻 Kintu Michael Evans 🔥🔥 for(int i = 1; i <= n; i++) { if(i % 3 == 0) Console.Write("*"); else Console.Write(i); }
16th Dec 2020, 7:26 PM
A͢J
A͢J - avatar