text: Program to find the head start in a race | C ++ implementation of above approach ; Function to find the B start to C ; When B completed it 's 100 meter  then Completed meters by C is ; Driver Code . ; When A completed it 's 100 meter  Then completed meters of B and C is
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; int Race ( int B , int C ) { int result = 0 ; result = ( ( C * 100 ) / B ) ; return 100 - result ; } int main ( ) { int B = 10 , C = 28 ; B = 100 - B ; C = 100 - C ; cout << Race ( B , C ) << " ▁ meters " ; return 0 ; }