Linear shear flows, forces, and heat transfer across a single and two tandem square cylinders are numerically investigated at Reynolds numbers Re = 70-150 and a Prandtl number Pr = 0.71, with the dimensionless inlet shear rateK = 0-0.2. For the two tandem cylinders, the scaled cylinder-gap spacing (S*) is varied from 1.0 to 5.0. The flow is assumed laminar and two-dimensional. The numerical method is based on a finite-volume technique. The effects ofK, Re, andS*are investigated on the heat transfer topology, flow structures, and aerodynamic parameters including vortex shedding frequency, pressure coefficient, lift and drag forces, and Nusselt number. For the single cylinder, whenK not equal 0, the time-mean lift force is negative for Re = 70 and 100 but positive for Re = 150. The lift magnitude linearly increases withK. For tandem cylinders, employing three initial conditions for someS*values yields two solutions linked to hysteresis (modes I and II) in the flow, forces, and heat transfer. Hysteresis is observed forS* = 2.0-5.0 whenK = 0.2 and Re = 150. Mode I turns in a smaller time- and surface-averaged Nusselt number than mode II. In general, the inlet shear has more effect on the flow around the downstream cylinder than that around the upstream cylinder.