6.4.. Napisati program koji za učitano x ispisuje vrijednost y po formuli: c) y = tg x.
Opis rješenja:
Opis programa:
Listing programa:
package zadatak;
import java.util.Scanner;
public class P06411134 {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
System.out.print("Unesi x: ");
double x=input.nextDouble();
double y;
y = Math.tan(x) ;
System.out.println("y="+(y));
}}
Ispis na ekranu:
Index
|