text: Calculate 7 n / 8 without using division and multiplication operators | C program to evaluate ceil ( 7 n / 8 ) without using * and / ; Note the inner bracket here . This is needed because precedence of ' - ' operator is higher than ' < < ' ; Driver program to test above function
code: #include <stdio.h> NEW_LINE int multiplyBySevenByEight ( unsigned int n ) { return ( n - ( n >> 3 ) ) ; } int main ( ) { unsigned int n = 9 ; printf ( " % d " , multiplyBySevenByEight ( n ) ) ; return 0 ; }