0
can anyone help me to fixed this code
int number = Convert.ToInt32(Console.ReadLine()); for (int i=1;i<=number;i++) { if (i%3==0) { i="*"; } Console.Write(i); }
4 Respuestas
+ 7
//try this
for (int i=1;i<=number;i++)
{
if (i%3==0)
{
Console.Write("*");
}
else {
Console.Write(i);
}
}
+ 1
you didn't close the curly braces of your for loop ;P
0
When the input =7
Output must = 12*45*7