/*********************************************************** RP_miles2.ch Ratios and Proportions This is a simpler algorithm for the previous program, RP_miles1.ch. If an inch on a map represents 25 miles, how many miles does 5 inch represent? ************************************************************ Copyright 2014 SoftIntegration Inc. http://www.softintegration.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ***********************************************************/ // initialize variables int inches, miles, totalmiles; // assign values to variables inches = 5; miles = 25; // calculate total miles totalmiles = inches*miles; printf("totalmiles: %d\n", totalmiles);