Write a program that generates a table showing the sine, cosine, and tangent for angles from 0 to 90 degrees. Each line in the table should increment the angle by 5 degrees. Include column headings.
1
Expert's answer
2016-09-07T09:19:03-0400
public class Main { public static void main(String[] args) { System.out.println("Angle\t\t\tSin\t\t Cos\t\tTan"); for(int i = 0; i <= 90; i+=5){ System.out.printf("%-10d%10.2f%10.2f%10.2f\n", i,Math.sin(i),Math.cos(i),Math.tan(i)); } } }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment