Çözüldü Birinci Derece Eşitsizlik - Programlama

Konusu 'Denklem Çözme, Eşitsizlikler, Oran-Orantı, Özdeşlikler ve Çarpanlara Ayırma' forumundadır ve Honore tarafından 1 Şubat 2025 başlatılmıştır.

Yüklüyor...
  1. Honore

    Honore Yönetici Yönetici

    Mesajlar:
    10.005
    Beğenileri:
    657
    Cinsiyet:
    Bay
    Meslek:
    Müh. (Elk./Bilg.)
    [​IMG]
    https://i72.servimg.com/u/f72/19/97/10/39/tahter12.png
    345 TYT Matematik 2019-2020 (ÖSYM ve Orijinal Sorular)
    https://z-library.sk/book/5274588/b0689b/345-tyt-matematik-20192020-Ösym-ve-orijinal-sorular.html adresindeki sıkıştırılmış dosyadan çıkan "345 1 ve 2 bilinmeyenli denklem ve eşitsizlikler.pdf" dosyasındaki son soru, yanıtlar yok.Son soru, yanıtlar yok.

    Ali + Vedat < Vedat + Selami....(I)
    -Ali - Vedat < -Veli - Selami....(II)
    Ali + Selami < Veli + Vedat....(III)
    (I) ve (II) eşitsizlikleri taraf tarafa toplanıp sadeleştirilince Vedat > Veli....(IV)
    (I)'den (III) çıkarılıp sadeleştirilerek Veli > Selami....(V)
    (I) ve (III) eşitsizlikleri taraf tarafa toplanıp sadeleştirilince Ali < Vedat....(VI)
    (IV) ve (V) gereğince Vedat > Selami....(VII)
    (IV), (VI), (VII) eşitsizliklerine göre en ağır çocuk Vedat.

    Yapay Zekânın Fortran Çözümü:
    [​IMG]
    https://i72.servimg.com/u/f72/19/97/10/39/tahter13.png
    https://app.codeconvert.ai/code-generator?outputLang=Fortran

    Program:
    Kod:
    ! The program is written in modern Fortran style with "implicit none" to
    ! require explicit declaration of all variables.
    !
    ! The seesaw conditions provided in the problem statement are analyzed
    ! within the comments to justify that Vedat must be the heaviest child.
    !
    ! Since the problem is based on symbolic inequalities rather than
    ! computed weight values, no input is requested from the user.
    !
    ! The code prints the conclusion directly.
    !
    ! https://app.codeconvert.ai/code-generator?outputLang=Fortran
    
    program HeaviestChild
    ! Four children named Ali, Veli, Vedat, and Selami with their unknown weights are playing on a seesaw.
    ! If Ali and Veli are on the left side of the seesaw while Vedat and Selami are on the right, the right side touches the ground.
    ! If Ali and Vedat are on the left side of the seesaw while Veli and Selami are on the right, the left side touches the ground.
    ! If Ali and Selami are on the left side of the seesaw while Veli and Vedat are on the right, the right side touches the ground.
    ! Write a Fortran program to determine the heaviest child and print out his name.
      implicit none
    
      ! Based on the seesaw conditions:
      ! 1) Ali + Veli < Vedat + Selami          (right side touches the ground)
      ! 2) Ali + Vedat > Veli + Selami          (left side touches the ground)
      ! 3) Ali + Selami < Veli + Vedat          (right side touches the ground)
      !
      ! A brief analysis of these inequalities leads to the conclusion that
      ! Vedat's weight must be higher than the weights of the other children.
      ! Hence, Vedat is determined to be the heaviest child.
    
      print *, "Based on the given seesaw conditions, the heaviest child is Vedat."
    
    end program HeaviestChild
    Yapay zekânın analizi yeterince sayısal olmadığından kendi Fortran çözümüm:
    [​IMG]
    https://i72.servimg.com/u/f72/19/97/10/39/tahter14.png

    Program:
    Kod:
    ! https://i72.servimg.com/u/f72/19/97/10/39/tahter12.png
    ! 345 TYT Matematik 2019-2020 (ÖSYM ve Orijinal Sorular)
    ! https://z-library.sk/book/5274588/b0689b/345-tyt-matematik-20192020-%C3%96sym-ve-orijinal-sorular.html
    ! (Son soru, yanıtlar yok.)
    program weights
    integer::Ali,Veli,Vedat,Selami,i=0
    integer::Alix(55),Velix(55),Vedatx(55),Selamix(55)
    integer::MaksimumAgirlik
    
    ! Basitleştirme için çocukların ağırlıklarının 1 - 5 kg aralığında
    ! değiştiği varsayıldı. Gerçeğe yakın kilo ağırlıkları, örneğin
    ! 30 - 60 kg gibi, düşünülürse dizin (array) boyutları çok büyür ve döngü
    ! sınırlarının da buna göre değiştirilmesi gerekir ancak verilen
    ! eşitsizliklere göre sonuç değişmez.
    
    do Ali=1,5
      do Veli=1,5
        do Vedat=1,5
           do Selami=1,5
         
              if ( ( (Ali + Veli) < (Vedat + Selami) ).and. &
                   ( (Ali + Vedat) > (Veli + Selami) ).and. &
                   ( (Ali + Selami) < (Veli + Vedat) ) ) then
                      Alix(i+1) = Ali; Velix(i+1) = Veli
                      Vedatx(i+1) = Vedat; Selamix(i+1) = Selami
                      i=i+1
              endif     
         
            enddo
        enddo
      enddo
    enddo
    
    if ( &
         (MAXVAL(Alix) > MAXVAL(Velix)).and.   &
         (MAXVAL(Alix) > MAXVAL(Selamix)).and. &
         (MAXVAL(Alix) > MAXVAL(Vedatx))) then
          MaksimumAgirlik = Maxval(Alix)
          Write(6,10)"En agir Ali ve agirligi ", MaksimumAgirlik," kg."
    endif
    
    if ( &
         (MAXVAL(Velix) > MAXVAL(Alix)).and.    &
         (MAXVAL(Velix) > MAXVAL(Selamix)).and. &
         (MAXVAL(Velix) > MAXVAL(Vedatx))) then
          MaksimumAgirlik = Maxval(Velix)
          Write(6,10)"En agir Veli ve agirligi ", MaksimumAgirlik," kg."
    endif
    
    if ( &
         (MAXVAL(Selamix) > MAXVAL(Alix)).and.   &
         (MAXVAL(Selamix) > MAXVAL(Velix)).and.  &
         (MAXVAL(Selamix) > MAXVAL(Vedatx))) then
          MaksimumAgirlik = Maxval(Selamix)
          Write(6,10)"En agir Selami ve agirligi ", MaksimumAgirlik," kg."
    endif
    
    if ( &
         (MAXVAL(Vedatx) > MAXVAL(Alix)).and.  &
         (MAXVAL(Vedatx) > MAXVAL(Velix)).and. &
         (MAXVAL(Vedatx) > MAXVAL(Selamix))) then
          MaksimumAgirlik = Maxval(Vedatx)
          Write(6,10)"En agir Vedat ve agirligi ", MaksimumAgirlik," kg."
    endif
    
    10 format(2(a,i1))
    
    end program weights
     
    : Fortran

  2. Benzer Konular: Birinci Derece
    Forum Başlık Tarih
    Ivır Zıvır Sorular - Sohbet (Trivial Questions - Chat) Oran ve Orantı - Dört Bilinmeyenli Birinci Derece Denklem - Programlama 5 Aralık 2024
    Denklem Çözme, Eşitsizlikler, Oran-Orantı, Özdeşlikler ve Çarpanlara Ayırma Lineer Değişim - İki Bilinmeyenli Birinci Derece Denklem Sistemi 21 Kasım 2024
    Ivır Zıvır Sorular - Sohbet (Trivial Questions - Chat) Tümler ve Bütünler Açılar - Tek Bilinmeyenli Birinci Derece Denklem - Orantı - Dereceden Radyana Dön 13 Ekim 2024
    Katı Cisimler ve Diğer Konular Genel Konik Denkleminde Diskriminant (YKS'de Olmayabilir) - Birinci Derece Eşitsizlik 2 Eylül 2024
    Hareket, Hız, Yüzde, Faiz, Sayısal Yetenek Problemleri ve Genel Kavramlar İki Bilinmeyenli Birinci Derece Denklemle Satış, Kâr, Zarar ve Yüzde Problemi Çözümü 26 Ağustos 2024

Sayfayı Paylaş