Bodovi

    0

    0

    This code prints out "vnesi poeni: 10" when the user types in an integer between 0 and 10, "vnesi poeni: 11" when the user types in an integer between 11 and 20, and "vnesi poeni: 21" when the user types in an integer between 21 and 30. Otherwise, it prints "nema takva ocena".

    #include <iostream>
    using namespace std;
    
    int main()
    {
      int bodovi;
      cout << "vnesi poeni: ";
      cin >> bodovi;
      if ((bodovi >= 0) && (bodovi <= 10))
      {
        cout << "imash " << bodovi << " bodovi toa e kec" << "\n";
      }
      if ((bodovi >= 11) && (bodovi <= 20))
      {
        cout << "imash " << bodovi << " bodovi toa e dvojka" << "\n";
      }
      if ((bodovi >= 21) && (bodovi <= 30))
      {
        cout << "imash " << bodovi << " bodovi toa e trojka" << "\n";
      }
      if ((bodovi >= 31) && (bodovi <= 40))
      {
        cout << "imash " << bodovi << " bodovi toa e cetvorka" << "\n";
      }
      if ((bodovi >= 41) && (bodovi <= 50))
      {
        cout << "imash " << bodovi << " bodovi toa e petka" << "\n";
      }
      else if ((bodovi <= 0) || (bodovi >= 50))
      {
        cout << "nema takva ocena" << "\n";
      }
      return 0;
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.