5.Write a function called isValidOddDigits that takes an integer number and returns 1 if the number represents valid code and 0 otherwise. Valid code is determined according to the following rule: The sum of the digits must be odd number. For example, the number 324 is valid because the sum of the digits is 9, which is odd. However, the number 114 is not valid because the sum is 6 which is not odd. Write a complete C++ program with a function named CountDiv5 that accepts two integer numbers n1 and n2 where n1 must be less than n2. The function should return the number of integers divisible by 5 between n1 and n2 inclusively. Write a function ConvertToCelsuis which takes a Fahrenheit temperature and return its equivalent in Celsius. C = 0.556 × (F-32)
5.Write a function called isValidOddDigits that takes an integer number and returns 1 if the number represents valid code and 0 otherwise. Valid code is determined according to the following rule: The sum of the digits must be odd number.
For example, the number 324 is valid because the sum of the digits is 9, which is odd. However, the number 114 is not valid because the sum is 6 which is not odd.
-
Write a complete C++ program with a function named CountDiv5 that accepts two integer numbers n1 and n2 where n1 must be less than n2.
The function should return the number of integers divisible by 5 between n1 and n2 inclusively.
-
Write a function ConvertToCelsuis which takes a Fahrenheit temperature and return its equivalent in Celsius.
C = 0.556 × (F-32)
Step by step
Solved in 8 steps with 7 images