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); } } } }
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;
}
+ 1
🥇👩💻 Kintu Michael Evans 🔥🔥 Check my reply again. Edited
0
Help me to spot a mistake
0
🥇👩💻 Kintu Michael Evans 🔥🔥
for(int i = 1; i <= n; i++) {
if(i % 3 == 0)
Console.Write("*");
else
Console.Write(i);
}