6.4.. Napisati program koji za učitano x ispisuje vrijednost y po formuli: d) y = log x.
Opis rješenja:
Opis programa:
Listing programa:
package zadatak;
import java.util.Scanner;
public class P06411135 {
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.log10(x) ;
System.out.println("y="+(y));
}}
Ispis na ekranu:
Index
|