0

Esta bien el resultado pero no me aprueba..ayuda!!!

class Program { static void Main(string[] args) { int x = 1; int number = Convert.ToInt32(Console.ReadLine()); //tu código va aquí do { if ( x % 3 == 0 ) { Console.Write("*"); } else { Console.Write(""+ x);} x++; if (x == number ) { Console.Write(""+ number ); } }while(x != number ); } }

21st Jun 2021, 5:29 PM
anibal heredia
anibal heredia - avatar
4 ответов
+ 1
rewrite it, and do it likes this int number = Convert.ToInt32(Console.ReadLine()); for(int i = 1; i <= number; i ++){ if(i % 3 == 0){ Console.Write("*"); continue; } Console.Write(i); }
21st Jun 2021, 6:43 PM
JRAMAHES
JRAMAHES - avatar
0
cause the problem is asking to multiply by 3
21st Jun 2021, 6:43 PM
JRAMAHES
JRAMAHES - avatar
0
Gracias...
21st Jun 2021, 6:44 PM
anibal heredia
anibal heredia - avatar
0
you wel
21st Jun 2021, 6:49 PM
JRAMAHES
JRAMAHES - avatar