6.4.. Napisati program za izračunavanje pređenog puta (s) pri jednolikom ubrzanom kretanju ( s=v0t + at2/2 ).
Opis rješenja:
Opis programa:
Listing programa:
package zadatak;
import java.util.Scanner;
public class P06411126 {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
System.out.print("Unesi pocetnu brzinu(m/s): ");
double v0=input.nextDouble();
System.out.print("Unesi vrijeme kretanja(s): ");
double t=input.nextDouble();
System.out.print("Unesi ubrzanje(m/s2): ");
double a=input.nextDouble();
System.out.print("Predjeni put je(m): " +(v0*t+a*t*t/2));
}
}
Ispis na ekranu:
Index
|