CODE FOR C
A number x represented by its
digits "abcdefg" is divisible
by 11 if and only if:
a - b + c - d + e - f + g = 0
consider that a number x is represented in form of an array,
where every digit is stored in a position of it. Its size is equal
to the number of digits that it counts.
e.g.
x= 745
number_array = {7,4,5} , size=3
Question:
write the function int divise_11(int
number_array[], int size) that takes
an array that represents a number and
its size:
The function should return 0 if x is
divisible by 11 and 1 otherwise.
Note: You do not need to print any
value in your function.
For example:
CODE FOR C A number x represented by its digits "abcdefg" is divisible by 11 if and only if: a - b + c - d + e - f + g =
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
CODE FOR C A number x represented by its digits "abcdefg" is divisible by 11 if and only if: a - b + c - d + e - f + g =
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!