64 573
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #61741 in Java | JSP | JSF for Bill DeShields

Question #61741
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.
Expert's answer

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));
}
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions