mam problem :P
jeśli rok jest podzielny przez 400 to przestepny, jeśli 4 przez to przestępny reszta to zwykły.
nastukałem tak
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <cstdio>
using namespace std;
int main ()
{
int liczba;
cin >> liczba;
if (liczba%4==0) cout << "Rok Przestepny";
else
cout << "Rok zwykly";
if (liczba%100==0) cout <<"Rok Przestepny";
else
cout << "Rok zwykly";
return 0;
}
#include <iostream>
#include <math.h>
#include <cstdio>
using namespace std;
int main ()
{
int liczba;
cin >> liczba;
if (liczba%4==0) cout << "Rok Przestepny";
else
cout << "Rok zwykly";
if (liczba%100==0) cout <<"Rok Przestepny";
else
cout << "Rok zwykly";
return 0;
}
nie moge uzywac 'boole'
plz halp
Zakładki