- 3
What is the logic for multiple of 3 code in C#
Logic for multiple of 3 code You are an elementary school teacher and explaining multiplication to students. You are going to use multiplication by 3 as your example. 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
7 Answers
+ 3
Ashok Ghanta ,
please give a complete task description, also link your attempt here.
thanks!
+ 2
Only print
3
6
9
And other multiples' of 3
+ 2
Ashok Ghanta ,
we are still missing your attempt. please put your code in playground, save it, and share it here.
thanks!
+ 1
if x%3==0
+ 1
Suppose n is 10 then the output has to be
1, 2, * ,4 ,5 ,* ,7, 8, * ,10
Multiples of 3 should be replaced by *
0
You are an elementary school teacher and explaining multiplication to students.
You are going to use multiplication by 3 as your example.
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
0
Please Give Me the completed Solution