SHARE
TWEET

Untitled

a guest Jun 19th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.*;
  2. public class Ppa1_cv04_2_A10B0656P {
  3.     public static void main(String[] args) {
  4.         Scanner vstup=new Scanner(System.in);
  5.                 System.out.println("---Vysledky---");
  6.         System.out.println("Zadej realne cislo: ");
  7.         double d=vstup.nextDouble();
  8.  
  9.  
  10.         if(d<0){
  11.           System.out.println(d+" odmocnina z 10 = "+Math.pow(10,(1/Math.abs(d))));
  12.         }else if(d>0){
  13.            System.out.println("10^"+d+" = "+Math.pow(10,d));
  14.         }else if(d==0){
  15.             System.out.println("Vstup = "+d);
  16.         }
RAW Paste Data
Want to get better at Java?
Learn to code Java in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top