The potential difference across ammeter and shunt is the same Let ia is the current. Flowing through ammeter and i the total current. So, a current i−ia will flow through shunt resistance
Potential difference across ammeter and shame resistance is the same That ia×R=(i−ia)×S r S=