+ Reply to Thread
Results 1 to 1 of 1
  1. [C++]Algoritm CMMDC si CMMMC

    #1
    Moderator:
    Programare
    ~Wolf~'s Avatar
    Member since
    Jan 2017
    Location
    Dark abyss
    Posts
    3,107
    Last username
    GaBiTzU M@riju@n@ |Wolf| WarGods | Wolf
    Mentioned
    39 Post(s)
    Achievements Visitor Messages Given 1 Days Registered 3 Mentions Received 1 Mentions Given 2 Mentions Given 1 Visitor Messages Received 2 Visitor Messages Received 1 Total Posts 3
    Doneaza
    Sustine Comunitatea WarGods!
    Fii unul de-al nostru! Doneaza
    Doneaza in Cont Bancar
    Click aici pentru a face o Donatie

    [C++]Algoritm CMMDC si CMMMC

    Algoritm pentru a afla CMMDC(cel mai mare divizor comun) si CMMMC(cel mai mic multiplu comun) al unui numar natural.

    Pentru CMMDC:
    Varianta 1 - impartiri repetate

    C++ Code:
    You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!


    Varianta 2 - scaderi repetate , o varianta care dureaza putin mai mult din cauza a prea multor scaderi
    C++ Code:
    You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!


    BONUS!- Varianta 3 - Varianta recursiva
    C++ Code:
    You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!


    Personal va recomand prima varianta datorita eficientei din punct de vedere al timpului


    Pentru CMMMC:

    C++ Code:
    You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!


    NOTA!
    -desigur ca in locul algoritmului cu scaderi repetate putem folosi algoritmul cu impartirile repetate, ramane la alegerea dumneavoastra
    -va rog lasati reply daca gasiti orice fel de greseala, ma ajuta mult
    Last edited by ~Wolf~; 26-10-2020 at 09:07 AM.
    Tutoriale C++: CLICK AICI
    Like -=Christian=- a dat Like acetui post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Partners
Humble Monthly Bundle
Voucher PC-Garage