Instrukcje warunkowe
Ostatnio zmodyfikowano 2015-01-02 23:01
SocrateZ  | 
» 2015-01-02 21:32:38 Choćby się << cenzura >> wynik modulo nigdy nie będzie ułamkiem.  | 
 | 
Monika90  | 
» 2015-01-02 22:04:32 #include <iostream> #include <string>
  int main() {     std::string pesel;     std::cin >> pesel;          if( pesel[ 2 ] >= '8' )          std::cout << "18";     else if( pesel[ 2 ] >= '6' )          std::cout << "22";     else if( pesel[ 2 ] >= '4' )          std::cout << "21";     else if( pesel[ 2 ] >= '2' )          std::cout << "20";     else          std::cout << "19";          std::cout << pesel[ 0 ] << pesel[ 1 ] << std::endl; }
   | 
 | 
Sornar Temat założony przez niniejszego użytkownika  | 
» 2015-01-02 23:01:45 Program działa, super dziękuje. Wszystko jasne. Dziękuje za pomoc.  | 
 | 
| 1 « 2 »  |