fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. int main(void) {
  4. int year, mont, day;
  5. cout<<"Enter number of year\n";
  6. cin>>year;
  7. cout<<"Enter number of month\n"
  8. cin>>day;
  9. cout<<"Enter number of day\n";
  10. cin>>day;
  11. month-=2;
  12. if(month<0){
  13. month+=12;
  14. year--;
  15. }
  16. month*=month*83/32;
  17. month+=day;
  18. month+=year;
  19. month+=year/4;
  20. month-=year/100;
  21. month+=year/400;
  22. month%=7;
  23.  
  24. cout<<month;
  25.  
  26. return 0;
  27. }
  28.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
2016 2 10
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:1: error: expected ‘;’ before ‘cin’
 cin>>day;
 ^~~
prog.cpp:11:1: error: ‘month’ was not declared in this scope
 month-=2;
 ^~~~~
stdout
Standard output is empty