• Telefon : +40 728 88 22 88
  • Program de lucru : Vezi orarul!
  • Adresă : Bacău, str. Mihai Eminescu, nr. 1, bloc. A1

Calculator în limba română

Programul va putea face calcule simple de tipul operand1 operator operand2,  in care operatorii sunt cei aritmetici (+,-,*,/), plecând de la o propoziție interogativă în limba română, de genul „Cât este suma dintre 3 și patru?” sau „Care este rezultatul înmulțirii lui zece cu paisprezece?”.

Input: un șir de caractere, conținând o întrebare în limba română despre o operație de tipul menționat.

Output: un șir de caractere, reprezentând rezultatul operației, scris cu cuvinte, în limba română

Restricții: operanzii și rezultatul operației sunt numere naturale între 0 și 100

Algoritmul: pentru a rezolva aceasta problema, vom lua un exemplu: „Care este rezultatul inmultirii lui zece cu paisprezece?”

  1. se desparte propoziția în cuvinte, formând un vector de cuvinte: [„Care”, „este”, „rezultatul”, „inmultirii”, „lui”, „zece”, „cu”, „paisprezece”, „?”];
  2. se elimină cuvintele inutile (de exemplu, „Care”, „este”, „rezultatul”, „lui”, „cu”, „?”);
  3. celelalte cuvinte se aduc la o formă standard (de exemplu, „inmultirii” -> „*”, „zece” -> „10”, „paisprezece” -> „14”); pentru a gasi „forma standard” a fiecarui cuvant, vom asocia fiecărui operand o listă de cuvinte care îl reprezintă, de exemplu pentru adunare avem [„+”, „suma”, „plus”, „adunare”, „adunat”, „insumat”, „si cu”, „marit cu”,…];
  4. vectorul de trei cuvinte obținut, se pune în ordine infixată (cu operandul la mijloc) (de exemplu, [„*”, „10”, „14”] -> [„10”, „*”, „14”]);
  5. se evaluează expresia, transformând șirurile de cifre în numere și ținând cont de operator; astfel se obține o valoare numerică (de exemplu, „10” -> 10, „14” -> 14 și aplicând „*” pentru 10 și 14 se obține 140);
  6. se transforma valoarea numerică în cuvânt în limba română (de exemplu, „o suta patru zeci”).

9 Comments

  • Solar panel

    - 13/01/2023 at 16:28

    We always follow your beautiful content I look forward to the continuation. https://yoykem.com.tr/

  • no 19 butik

    - 13/01/2023 at 21:01

    Thank you for great article. I look forward to the continuation. https://no19butik.com/

  • farmasi üye ol

    - 14/01/2023 at 01:56

    There is some nice and utilitarian information on this site https://farmasiucretsizuyelik.com/

  • Qpsfvs

    - 06/05/2023 at 20:44

    cialis 10mg pills cialis 40mg oral ed pills that work quickly

  • Erickduh

    - 20/06/2023 at 07:55

    https://whyride.info/ – whyride

  • Erickduh

    - 07/07/2023 at 16:50

    whyride

  • MichaelJaf

    - 02/09/2023 at 21:45

    To understand present scoop, follow these tips:

    Look fitted credible sources: https://ukcervicalcancer.org.uk/articles/who-left-q13-news.html. It’s high-ranking to secure that the news outset you are reading is respected and unbiased. Some examples of good sources include BBC, Reuters, and The Different York Times. Review multiple sources to get a well-rounded sentiment of a particular info event. This can help you get a more over picture and keep bias. Be aware of the angle the article is coming from, as flush with respected hearsay sources can have bias. Fact-check the low-down with another source if a scandal article seems too lurid or unbelievable. Always pass sure you are reading a known article, as news can transmute quickly.

    By means of following these tips, you can befit a more informed scandal reader and more wisely know the cosmos here you.

  • Davidkek

    - 11/09/2023 at 03:38

    Totally! Find info portals in the UK can be unendurable, but there are tons resources ready to boost you mark the perfect in unison as you. As I mentioned formerly, conducting an online search an eye to https://marinamarina.co.uk/articles/age-of-eboni-williams-fox-news-anchor-revealed.html „UK news websites” or „British news portals” is a pronounced starting point. Not only purposefulness this hand out you a encyclopaedic tip of report websites, but it intention also provender you with a better understanding of the in the air hearsay view in the UK.
    On one occasion you secure a itemize of potential news portals, it’s important to evaluate each undivided to shape which upper-class suits your preferences. As an example, BBC News is known in place of its intention reporting of report stories, while The Trustee is known quest of its in-depth criticism of partisan and social issues. The Self-governing is known representing its investigative journalism, while The Times is known in the interest of its work and finance coverage. During understanding these differences, you can select the rumour portal that caters to your interests and provides you with the rumour you have a yen for to read.
    Additionally, it’s significance all things close by despatch portals with a view fixed regions within the UK. These portals provide coverage of events and news stories that are applicable to the область, which can be firstly helpful if you’re looking to safeguard up with events in your close by community. In behalf of instance, local communiqu‚ portals in London include the Evening Pier and the Londonist, while Manchester Evening News and Liverpool Repercussion are stylish in the North West.
    Overall, there are numberless statement portals available in the UK, and it’s high-ranking to do your inspection to remark the joined that suits your needs. At near evaluating the different news programme portals based on their coverage, variety, and article standpoint, you can select the song that provides you with the most fitting and interesting despatch stories. Esteemed fortunes with your search, and I hope this data helps you come up with the correct news portal since you!

  • Watch milf webcam free

    - 19/09/2023 at 23:44

    And seize every available moment to make a connection

Leave a Reply