У вас вопросы?
У нас ответы:) SamZan.net

this b thisb

Работа добавлена на сайт samzan.net: 2016-06-09

Поможем написать учебную работу

Если у вас возникли сложности с курсовой, контрольной, дипломной, рефератом, отчетом по практике, научно-исследовательской и любой другой работой - мы готовы помочь.

Предоплата всего

от 25%

Подписываем

договор

Выберите тип работы:

Скидка 25% при заказе до 20.2.2025

№9

package rivvnannja;

public class Test

{

   float a, b, c;

   float d;

   int n;

public Test (){

 a = 1;

 b = 1;

 c = 1;}

public Test(float a, float b, float c){

 this.a = a;

 this.b = b;

 this.c = c;}

public String toString(){

 return new String("a = "+this.a+ " b = " +this.b + " c = "+this.c+" d = "+this.d);}

public void setD ( ){

 this.d = (this.b * this.b) - (4 * this.a * this.c);}

public int countN (){

 if (this.d < 0) this.n = 0;

 else if (this.d == 0) this.n = 1;

 else this.n = 2;

 return this.n;}

public float[] getX (){

 float arr[];

 if (this.d < 0) {

  arr = null;}

 else if (this.d == 0) {

  arr = new float [1];

  arr[0] = (-this.b) / (2 * this.a);}

 else {

  arr = new float [2];

  arr[0] = (float) ((-this.b + Math.sqrt(this.d)) / (2 * this.a));

  arr[1] = (float) ((-this.b - Math.sqrt(this.d)) / (2 * this.a));}

 return arr;}

   public static void main(String args []){

    Test a = new Test (1,6,2);

    a.setD();

    a.countN();

    float arr[] = a.getX();

    System.out.println(a.toString());

    if (arr == null ){ System.out.println("koreniv nema"); }

    else  

     for (float i:arr){

      System.out.println("x = "+i);

     }    }     }

№9

package rivvnannja;

public class Test

{

   float a, b, c;

   float d;

   int n;

public Test (){

 a = 1;

 b = 1;

 c = 1;}

public Test(float a, float b, float c){

 this.a = a;

 this.b = b;

 this.c = c;}

public String toString(){

 return new String("a = "+this.a+ " b = " +this.b + " c = "+this.c+" d = "+this.d);}

public void setD ( ){

 this.d = (this.b * this.b) - (4 * this.a * this.c);}

public int countN (){

 if (this.d < 0) this.n = 0;

 else if (this.d == 0) this.n = 1;

 else this.n = 2;

 return this.n;}

public float[] getX (){

 float arr[];

 if (this.d < 0) {

  arr = null;}

 else if (this.d == 0) {

  arr = new float [1];

  arr[0] = (-this.b) / (2 * this.a);}

 else {

  arr = new float [2];

  arr[0] = (float) ((-this.b + Math.sqrt(this.d)) / (2 * this.a));

  arr[1] = (float) ((-this.b - Math.sqrt(this.d)) / (2 * this.a));}

 return arr;}

   public static void main(String args []){

    Test a = new Test (1,6,2);

    a.setD();

    a.countN();

    float arr[] = a.getX();

    System.out.println(a.toString());

    if (arr == null ){ System.out.println("koreniv nema"); }

    else  

     for (float i:arr){

      System.out.println("x = "+i);

     }    }     }

№9

package rivvnannja;

public class Test

{

   float a, b, c;

   float d;

   int n;

public Test (){

 a = 1;

 b = 1;

 c = 1;}

public Test(float a, float b, float c){

 this.a = a;

 this.b = b;

 this.c = c;}

public String toString(){

 return new String("a = "+this.a+ " b = " +this.b + " c = "+this.c+" d = "+this.d);}

public void setD ( ){

 this.d = (this.b * this.b) - (4 * this.a * this.c);}

public int countN (){

 if (this.d < 0) this.n = 0;

 else if (this.d == 0) this.n = 1;

 else this.n = 2;

 return this.n;}

public float[] getX (){

 float arr[];

 if (this.d < 0) {

  arr = null;}

 else if (this.d == 0) {

  arr = new float [1];

  arr[0] = (-this.b) / (2 * this.a);}

 else {

  arr = new float [2];

  arr[0] = (float) ((-this.b + Math.sqrt(this.d)) / (2 * this.a));

  arr[1] = (float) ((-this.b - Math.sqrt(this.d)) / (2 * this.a));}

 return arr;}

   public static void main(String args []){

    Test a = new Test (1,6,2);

    a.setD();

    a.countN();

    float arr[] = a.getX();

    System.out.println(a.toString());

    if (arr == null ){ System.out.println("koreniv nema"); }

    else  

     for (float i:arr){

      System.out.println("x = "+i);

     }    }     }

№9

package rivvnannja;

public class Test

{

   float a, b, c;

   float d;

   int n;

public Test (){

 a = 1;

 b = 1;

 c = 1;}

public Test(float a, float b, float c){

 this.a = a;

 this.b = b;

 this.c = c;}

public String toString(){

 return new String("a = "+this.a+ " b = " +this.b + " c = "+this.c+" d = "+this.d);}

public void setD ( ){

 this.d = (this.b * this.b) - (4 * this.a * this.c);}

public int countN (){

 if (this.d < 0) this.n = 0;

 else if (this.d == 0) this.n = 1;

 else this.n = 2;

 return this.n;}

public float[] getX (){

 float arr[];

 if (this.d < 0) {

  arr = null;}

 else if (this.d == 0) {

  arr = new float [1];

  arr[0] = (-this.b) / (2 * this.a);}

 else {

  arr = new float [2];

  arr[0] = (float) ((-this.b + Math.sqrt(this.d)) / (2 * this.a));

  arr[1] = (float) ((-this.b - Math.sqrt(this.d)) / (2 * this.a));}

 return arr;}

   public static void main(String args []){

    Test a = new Test (1,6,2);

    a.setD();

    a.countN();

    float arr[] = a.getX();

    System.out.println(a.toString());

    if (arr == null ){ System.out.println("koreniv nema"); }

    else  

     for (float i:arr){

      System.out.println("x = "+i);

     }    }     }

№9

package rivvnannja;

public class Test

{

   float a, b, c;

   float d;

   int n;

public Test (){

 a = 1;

 b = 1;

 c = 1;}

public Test(float a, float b, float c){

 this.a = a;

 this.b = b;

 this.c = c;}

public String toString(){

 return new String("a = "+this.a+ " b = " +this.b + " c = "+this.c+" d = "+this.d);}

public void setD ( ){

 this.d = (this.b * this.b) - (4 * this.a * this.c);}

public int countN (){

 if (this.d < 0) this.n = 0;

 else if (this.d == 0) this.n = 1;

 else this.n = 2;

 return this.n;}

public float[] getX (){

 float arr[];

 if (this.d < 0) {

  arr = null;}

 else if (this.d == 0) {

  arr = new float [1];

  arr[0] = (-this.b) / (2 * this.a);}

 else {

  arr = new float [2];

  arr[0] = (float) ((-this.b + Math.sqrt(this.d)) / (2 * this.a));

  arr[1] = (float) ((-this.b - Math.sqrt(this.d)) / (2 * this.a));}

 return arr;}

   public static void main(String args []){

    Test a = new Test (1,6,2);

    a.setD();

    a.countN();

    float arr[] = a.getX();

    System.out.println(a.toString());

    if (arr == null ){ System.out.println("koreniv nema"); }

    else  

     for (float i:arr){

      System.out.println("x = "+i);

     }    }     }




1. Тоталитаризм в полный рост - германский национал-социализм
2. 20г. дата оформления 1
3. Двигательно-координационные способности и основы их воспитания
4. Казахстанский государственный университет имени М
5. условная величина показывающая какими были бы затраты времени на выпуск данной продукции если бы трудоемк
6. ОРН - гестоз
7. Контрольная 2- Понятие и типы научных революций С
8. Реферат- Расширенное воспроизводство и накопление в сельском хозяйстве
9. Конспект лекций М
10. исследовательские опытноконструкторские и технологические работы