+ 2

I need help with the triple project at the end of module 2

it doesn't make any sense to me, tried to review the modules & look online for youtube videos but I still don't understand it.

11th Feb 2021, 3:09 PM
DEVAN MAUCH
DEVAN MAUCH - avatar
3 Answers
+ 3
„The program you are given takes N number as input. Write a program to output all numbers from 1 to N, replacing all numbers that are multiples of 3 by "*". Sample Input: 7. Sample Output: 12*45*7“. If you got 7 as input then you should print all numers from 1 to 7 in one line 1234567 but the second part of this task said replacing all numbers which are multiples of 3, that means such as 1*3 = 3, 2*3= 6, 3*3= 9, ... , and so on. That means for the above mentioned example with the input 7, that the printed output shall be 12*45*7 where the numbers are replaced with asterisk „*“.
11th Feb 2021, 4:50 PM
JaScript
JaScript - avatar
+ 3
DEVAN MAUCH I solved it by checking the remainder of each digit under the input when divided by 3. Utilize a for loop to check each character of the input string and then decide what to print. You do not need to build a new string because you can utilize Console.Write() instead of Console.WriteLine() Here is my solution with explanations: https://code.sololearn.com/c7wmwD8OZpIB/?ref=app
12th Feb 2021, 3:16 PM
Elijah Brown
Elijah Brown - avatar
+ 2
12 should be read as one two After one two Three is divedable, so it is replaced by an asterisk This followed by Four and five And so on. Do not read twelve, fourty-five
11th Feb 2021, 5:41 PM
sneeze
sneeze - avatar