Package java.util

Examples of java.util.Scanner.nextDouble()


    data = input.nextDouble();
    munozAccount.deposit(data);
    System.out.println("Balance is: " + money.format(munozAccount.getBalance()));

    System.out.print("Enter withdrawal amount: ");
    data = input.nextDouble();
    munozAccount.withdrawal(data);
    System.out.println("Balance is: " + money.format(munozAccount.getBalance()))
  }
}
View Full Code Here


        final double PI = 3.1415926535; //set const PI to 3.1415926535
        double radius; //variable for radius of circle (data from User)
        double circum; //variable for circumference of circle (calculated)
       
        System.out.print("Enter a circle radius: "); //Asks user for radius
        radius = input.nextDouble(); //collects double from user for radius
        circum = 2 * PI * radius; //calculates circumference
        System.out.println("The Circumference for this circle is: " + circum); //displays circumference
        }
    } //end class definition
View Full Code Here

       
        // utiliser tous les caracteres nom numérique comme séparateur
        scn.useDelimiter("[^0-9.+-]*");
        for (int i = 0; i < count; i++) {
            System.out.print("Vecteur " + i + " :\t");
            vectors[i] = new Vecteur3d(scn.nextDouble(), scn.nextDouble(),
                    scn.nextDouble());
        }
       
        for(Vecteur3d vector : vectors) {
            System.out.println(vector);
View Full Code Here

       
        // utiliser tous les caracteres nom numérique comme séparateur
        scn.useDelimiter("[^0-9.+-]*");
        for (int i = 0; i < count; i++) {
            System.out.print("Vecteur " + i + " :\t");
            vectors[i] = new Vecteur3d(scn.nextDouble(), scn.nextDouble(),
                    scn.nextDouble());
        }
       
        for(Vecteur3d vector : vectors) {
            System.out.println(vector);
View Full Code Here

        // utiliser tous les caracteres nom numérique comme séparateur
        scn.useDelimiter("[^0-9.+-]*");
        for (int i = 0; i < count; i++) {
            System.out.print("Vecteur " + i + " :\t");
            vectors[i] = new Vecteur3d(scn.nextDouble(), scn.nextDouble(),
                    scn.nextDouble());
        }
       
        for(Vecteur3d vector : vectors) {
            System.out.println(vector);
        }
View Full Code Here

public class Exercice14 {
    public static void main (String [] args)
    {
        Scanner scn = new Scanner(System.in);
        System.out.print("Entrez epsilon : ");
        double epsilon = scn.nextDouble();

        double Un = 1, Un1;
        do {
            Un1 = Un + 1 / Un;
            Un = Un1;
View Full Code Here

import java.util.Scanner ;
public class Max3nbr {
  public static void main ( String[] args ) {
    Scanner clavier = new Scanner ( System.in )
    double x = clavier.nextDouble();
    double y = clavier.nextDouble();
    double z = clavier.nextDouble();
    double resultat;

    if(Max2nbr(x,y) >= z){
View Full Code Here

import java.util.Scanner ;
public class Max3nbr {
  public static void main ( String[] args ) {
    Scanner clavier = new Scanner ( System.in )
    double x = clavier.nextDouble();
    double y = clavier.nextDouble();
    double z = clavier.nextDouble();
    double resultat;

    if(Max2nbr(x,y) >= z){
      System.out.println(" Le nombre le plus grand est" +Max2nbr(x,y));
View Full Code Here

public class Max3nbr {
  public static void main ( String[] args ) {
    Scanner clavier = new Scanner ( System.in )
    double x = clavier.nextDouble();
    double y = clavier.nextDouble();
    double z = clavier.nextDouble();
    double resultat;

    if(Max2nbr(x,y) >= z){
      System.out.println(" Le nombre le plus grand est" +Max2nbr(x,y));
    }else{
View Full Code Here

    double temporary;

    System.out.println("Please enter two number each follow by [Enter]");

    Scanner clavier = new Scanner ( System.in );
    nbr1 = clavier.nextDouble();
    nbr2 = clavier.nextDouble();

    System.out.println(nbr1+"|"+nbr2);

    temporary = nbr1;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.