Tires don't have to have exactly the same pressure. Modify the program for exercise 2 so that the front tires can be within 3 psi of each other, and
the rear tires can be within 3 psi of each other.
Input right front pressure
35
Input left front pressure
37
Input right rear pressure
41
Input left rear pressure
44
Inflation is OK

I don't need the code..All I need is the formula in getting psi or whatever formulas I need to derive with this output. Thanks in advance..Any help or explanation is could be helpful.

I think you are trying to make this more difficult than it really is. If you enter the psi for all 4 tires then all you have to do is subtract the psi of the two front tires to see if the result is less than 3, then do the same with the two back tires. This is a math problem that any 8 year old should be able to do.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.