/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication5;
import java.util.Scanner;
/**
*
* @author student
*/
public class car {
public int evolume;
public float maxspeed;
public float horsepower;
public char model;
public char trademark;
public char colour;
public float speed;
public int getmaxspeed(){
float maxspeed=(1.5*evolume)/33;
return maxspeed;
}
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
car maxspeed=new car();
car.colour=sc.nextLine();
car.trademark=sc.nextLine();
car.evolume=sc.nextint();
System.out.println(car.trademark+"Speed"+ car.maxspeed());
}
}
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication5;
import java.util.Scanner;
/**
*
* @author student
*/
public class car {
public int evolume;
public float maxspeed;
public float horsepower;
public char model;
public char trademark;
public char colour;
public float speed;
public int getmaxspeed(){
float maxspeed=(1.5*evolume)/33;
return maxspeed;
}
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
car maxspeed=new car();
car.colour=sc.nextLine();
car.trademark=sc.nextLine();
car.evolume=sc.nextint();
System.out.println(car.trademark+"Speed"+ car.maxspeed());
}
}
Комментариев нет:
Отправить комментарий