142k views
0 votes
ASTM grain size number calculator. Write a computer program that will ask the user to input the magnification of a micrograph of the sample for which the ASTM number is being calculated. The program should then ask the user for the number of grains counted and the area (in square inches) from which these grains were counted. The program then should calculate the ASTM number, taking into consideration the fact that the micrograph magnification is not 100 and the area may not have been one square inch.

1 Answer

6 votes

Final answer:

To calculate the ASTM grain size number, a computer program needs to take into account the magnification of the micrograph and the area from which the grains were counted. The program should prompt the user for the magnification, number of grains counted, and the area, and then perform the necessary calculations.

Step-by-step explanation:

The student is asking for a computer program that calculates the ASTM grain size number based on user input. The program needs to ask for the magnification of a micrograph, the number of grains counted, and the area from which the grains were counted. The program should consider the magnification of the micrograph and the area in the calculation. To calculate the ASTM number, you can use the formula:

ASTM Number = (Area / Magnification) * (Number of Grains / 2.87)

Make sure to prompt the user for the required information and perform the necessary calculations in the program.

ASTM is an organization that defines and publishes technical standards related to the quality of materials that can be used in the manufacturing of various products and pieces of equipment. ASTM code is made up of the standards that have been developed by committees within ASTM.

User Ofer Velich
by
8.4k points