Find ceil of a / b without using ceil ( ) function | C ++ program to find ceil ( a / b ) without using ceil ( ) function ; Driver function ; taking input 1 ; example of perfect division taking input 2
#include <cmath> NEW_LINE #include <iostream> NEW_LINE using namespace std ; int main ( ) { int a = 4 ; int b = 3 ; int val = ( a / b ) + ( ( a % b ) != 0 ) ; cout << " The ▁ ceiling ▁ value ▁ of ▁ 4/3 ▁ is ▁ " << val << endl ; a = 6 ; b = 3 ; val = ( a / b ) + ( ( a % b ) != 0 ) ; cout << " The ▁ ceiling ▁ value ▁ of ▁ 6/3 ▁ is ▁ " << val << endl ; return 0 ; }