0
How to get multiples of a certain number
3 Respostas
+ 1
Are you wanting to get N amount of multiples of a number, or all factors of a multiple?
I.E.
Number = 5
N = 4
Multiples = {5, 10, 15, 20}
Or
Multiple = 20
Factors = {1, 2, 4, 5, 10, 20}
+ 1
If(n%5==0){cout<<"beep"<<endl} is this correct
+ 1
Oh, are you doing the C++ countdown end of module project/ code coach?
If so you need to cin the given number and loop counting it down, outputing the number, then checking if the number is a multiple of 5 (like your code does), and output "Beep" if true.