Hey everyone ,
can someone help me with writing this code ?
Write down the code that finds out and appears all natural numbers from 100 to 200 that are full divided by 5 and 6,but not full divided by both of these numbers.
let the numbers appear 10 numbers per line.
a) implement the function inline bool divisible(int number)
that indicates whether a given number is
divisible by 5 or 6, but not with both of them
b)implement function inline Numbers void ( )
that uses the function divisible
to find and then press all numbers that satisfy the conditions defined in this task
c)implement the main function to call the function of Numbers
The task will not be considered,if the required functions of Divisible(full divided) and Numbers arent used .
Does anyone have an idea ?
I need helppp !!
Post a Reply
|Oldest Newest Rating|
· September 2, 2014
im not going to tell you the answers because i think you should learn yourself but....
for A) look into the modulus operator
also don't use inline functions, they are not needed as the compiler optimizes inlines with or without the keyword
· September 3, 2014
Its an exam problem so it needs to be done like that
Used in many types of software including music players, video games, and many large scale applications.
|Bucky Roberts Administrator|