Default

Java program to display the Mach number

Problem Statement

Write a Java program to display the Mach number of a flying object. The program should output the following as per the conditions

  • Print Subsonic if Mach < 1.0
  • Print Transonic if Mach = 1.0
  • Print Supersonic if Mach > 1.0
  • Print Hypersonic if Mach > 5.0

Given:

Mach Number = (Flying Object Speed) / (Speed of Sound)

 

Mach Number =  Object SpeedSound Speed

Speed of Sound = 343 m / s

Take input from the user the speed of the object.

 

IPO Chart for the Program: