Write a function that receives an input argument of a number of kilometers (km) and will output the conversions into both miles (mi) and US nautical miles (n.m.). Use the conversions: 1 km = 0.621 mi and 1 km = 0.540 n.m.
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Malik McMillon
el 19 de Oct. de 2016
Comentada: DGM
el 12 de En. de 2025
Write a function that receives an input argument of a number of kilometers (km) and will output the conversions into both miles (mi) and US nautical miles (n.m.). Use the conversions: 1 km = 0.621 mi and 1 km = 0.540 n.m.
0 comentarios
Respuesta aceptada
Más respuestas (1)
Tushar
el 12 de En. de 2025
x=input("Enter a valuein Km :");
mi=x*0.621;
nm=x*0.540;
mi
nm
2 comentarios
Walter Roberson
el 12 de En. de 2025
we do not recommend posting complete solutions to homework problems
DGM
el 12 de En. de 2025
To be fair, it's not a function, so I'd argue that the bulk of the actual non-obvious language-specific lesson hasn't been revealed.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!