Answer:
Here is the script:
function dd = functionDMS(dd)
prompt= 'Enter angle in DD form ';
dd = input(prompt)
while (~checknum(dd))
if ~checknum(dd)
error('Enter valid input ');
end
dd = input(prompt)
end
degrees = int(dd)
minutes = int(dd - degrees)
seconds = ( dd - degrees - minutes / 60 ) * 3600
print degrees
print minutes
print seconds
print dd
Explanation:
The script prompts the user to enter an angle in decimal degree (DD) form. Next it stores that input in dd. The while loop condition checks that input is in valid form. If the input is not valid then it displays the message: Enter valid input. If the input is valid then the program converts the input dd into degrees, minutes and seconds form. In order to compute degrees the whole number part of input value dd is used. In order to compute the minutes, the value of degrees is subtracted from value of dd. The other way is to multiply remaining decimal by 60 and then use whole number part of the answer as minutes. In order to compute seconds subtract dd , degrees and minutes values and divide the answer by 60 and multiply the entire result with 3600. At the end the values of degrees minutes and seconds are printed. In MATLAB there is also a function used to convert decimal degrees to degrees minutes and seconds representation. This function is degrees2dms.
Another method to convert dd into dms is:
data = "Enter value of dd"
dd = input(data)
degrees = fix(dd);
minutes = dd - degrees;
seconds = (dd-degrees-minutes/60) *3600;
Answer:
Professionalism means communicating effectively and appropriately and always finding a way to be productive. Employers want new workers to be responsible, ethical, and team oriented, and to possess strong communication, interpersonal, and problem solving skills. Wrap these skills up all together and you've got professionalism.
There are many types of unprofessional behavior in the workplace, which include habitual tardiness, absence, harassment or bringing personal issues to the job. These behaviors can cause disruption to the company as a whole, which means they should be dealt with as soon as possible.
Answer:
The statement is written in Java.
- System.out.printf("%.5f %.5f %.5f",a,b,c);
Explanation:
Presume that there are three variable a, b and c which have already been declared and initialized with 4.014268319, 14309, 0.00937608 respectively.
To print each of the value with 5 digits to the right of the decimal point, we can use printf() method. We create a format specifier %.5f which is a placeholder of a floating point value. The .5 will specify five digits to the right of the decimal point.
We just create three similar format specifiers ( one for variable a, b, and c, respectively) and include them into printf() method. This will print the output as follows:
4.01427 14309.00000 0.00938