+ 3
Помогите написать код
Вы учитель начальной школы, который объясняет своим ученикам умножение. Вы собираетесь использовать умножение на 3 в качестве примера. Вам дана программа, которая принимает число N в качестве входных данных. Напишите программу, которая будет выводить все числа от 1 до N, заменяя все числа кратные 3 на "*". Пример Входных Данных 7 Пример Выходных Данных 12*45*7
10 Antworten
+ 4
Ваня Скрыльников 
Это реально, если ты не нашёл решение задачи, попробуй моё, программа засчитает.
Очень обидно за то, что в описании не написано что можно изменять int number = Convert.ToInt32(Console.ReadLine()); на int number = int.Parse(Console.ReadLine());
+ 2
using System;
using System.Collections.Generic;
namespace SoloLearn
{
    class Program
    {
        static void Main(string[] args)
        {
            int number = Convert.ToInt32(Console.ReadLine());
			for (int x = 1 ; x <= number ; x += 1) 			{
				if (x%3==0)
				{ 
					Console.WriteLine("*");
				}
				else
				{
					Console.WriteLine(x);
				}
			}
        }
    }
}
+ 1
Все решается без Parse. Тоже долго думал над задачей, но получилось.
  //ваш код
           int a = 0;
            
      while(a < num) {
           a++; 
           if (a%3==0){
           Console.Write ("*");
           continue;
           }
           Console.Write (a);
           }
+ 1
N = int(input())
print(N*(N+1)//2)
А так ведь можно?гаусс же давно придумал
0
А попытки есть какие нибудь?
0
К Сожалению, задание в приложении слишком криповое.
https://code.sololearn.com/c99a3A0A165a
0
Я НЕ ПОНИМАЮ  ГДЕ ОШИБКА э
ЕСЛИ ВЕРИТЬ  ПРИЛОЖЕНИЮ ТО ВСЕ НОРМ 
НО  В ВИЖУАЛ СТУДИО  ОН  МЕНЯ  ШЛЕТ КУДА ПОДАЛЬШЕ 
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 age = Convert.Toint32(Console.ReadLine());
            Console.WriteLine("You are {0} years old", age);
        }
    }
}
0
Вот готовый код, который закрывает Тест 1, Тест 2, Тест 3
using System;
using System.Collections.Generic;
namespace SoloLearn
{
    class Program
    {
        static void Main(string[] args)
        {
            int number = Convert.ToInt32(Console.ReadLine());
int a = 1:
for ( ; a <= number; a++)
{
if (a%3==0) {
Console.Write("*");
continue;
}
Console.Writeline(a);
}
}
}
}
0
using System;
using System.Collections.Generic;
namespace SoloLearn
{
    class Program
    {
        static void Main(string[] args)
        {
            int number = Convert.ToInt32(Console.ReadLine());
            
       int i = 1; while (i<(number+1)){ if (i % 3 == 0){ Console.WriteLine("*"); 
       } else{ Console.WriteLine(i);
        } 
        i++; 
        } 
            
        }
    }
}    
/*number +1 надо делать в скобках иначе сам number тоже * заменяет*/
0
using System;
using System.Collections.Generic;
namespace SoloLearn
{
    class Program
    {
        static void Main(string[] args)
        {
            int number = int.Parse(Console.ReadLine());
            
            for(int x = 1; x <= number;x += 1)
            {
            if (x % 3 == 0)
            {
            Console.WriteLine("*");
            }
            else{
            Console.WriteLine(x);
            }
            
            }
        }
        
    }
}



