Нажимая на кнопку "Задать вопрос", я даю согласие на обработку персональных данных

Задать вопрос
Задать вопрос
  • написать программу решения квадратного уравнения ax^2+bx+c=0 в паскале,помогите плиз!!!

    • 02 February 2012
    • Ответ оставил: Anyasgibnewa

    Program yravnenie;

    Var
     a,b,c,D,x1,x2,p,q:Real;
    Begin
     Repeat
      Write('a= ');
      Readln(a);
      if a=0 then writeln('Error: a=0. Enter another value');
     Until a<>0;
     Write('b= ');
     Readln(b);
     Write('c= ');
     Readln(c);
     p:=b/a;
     q:=c/a;
     D:=Sqr(p/2)-q;
     If D>0 then
      begin
       Writeln('x1 = ',-p/2-Sqrt(D):0:5);
       Writeln('x2 = ',-p/2+Sqrt(D):0:5);
      end
     else
     If D=0 then
      Writeln('x1 = x2 = ',-p/2:0:5)
     else
      begin
       Writeln('x1 = ',-p/2:0:5,'-i*',Sqrt(-D):0:5);
       Writeln('x2 = ',-p/2:0:5,'+i*',Sqrt(-D):0:5);
      end;
     Readln;
    End.

    • НЕ НАШЛИ ОТВЕТ?
    Если вас не устраивает ответ или его нет, то попробуйте воспользоваться поиском на сайте и найти похожие ответы по предмету школьной программы: английский язык.
    На сегодняшний день (25.04.2024) наш сайт содержит 244790 вопросов, по теме: английский язык. Возможно среди них вы найдете подходящий ответ на свой вопрос.
  • Нажимая на кнопку "Ответить на вопрос", я даю согласие на обработку персональных данных

    Ответить на вопрос

Последние опубликованные вопросы

2 к6выу5у4в5ыу3ыцц Задание 2.7 Передайте следующие предложения в Passive Voice, обращая внимание на место предлога. E.g. We often speak about her. — She is often spoken about. 1. Bessie's father gave her a complete s... When and where are you going to have the celebration In your country at what times are the shops generally open? Почему сокращается численность Казахстанских козерогов?​ Why did people stay in their homes as much as possible?                A. The weather was cold B. There were many thievesC. There were police officers​ Use of English/ Task 4. Read and choose. 1. I enjoy to swim/ swimming. 2. I want to eat/ eating. 3. I hate to work/working on Sunday. 4. I want to learn/ learning Spanish. помогить, соч последнее ... B) Write sentences use Past Simple and Past Continuous 1)When/Alice/wake up /it/rain 2) Her/mother/make/breakfast/ when /she/come /home​ Topic 2. Write an article to a newspaper (120-150 words) describing the last Sport Competition where you or your friends participated (in a country or abroad) using Past tenses. Try to mention thes... сүт қоректілердің не жатады ​ Что делает человек, чтобы хорошо учиться в школе? Выбери и выпиши глаголы в форме прошедшего времени.1) Did he lived / live with his parents?2) She goed / went to the cinema last weekend.3) We didnt met / meet them at the station.​
*{ message }*