fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int Y,M,D;
  7. cin >>Y>>M>>D;
  8. s=(5*Y+M*M-D)%4;
  9. if(s==0)
  10. {cout<<Gryffindor<<endl;}
  11. else if (s==1)
  12. {
  13. cout<<Slytherin<<endl;
  14. }
  15. else if (s==2)
  16. {
  17. cout<<Ravenclaw<<endl;
  18. }
  19. else (s==3)
  20. {
  21. cout<<Hufflepuff<<endl;
  22. }
  23. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
2020
5
20
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:4: error: ‘s’ was not declared in this scope
    s=(5*Y+M*M-D)%4;
    ^
prog.cpp:10:10: error: ‘Gryffindor’ was not declared in this scope
   {cout<<Gryffindor<<endl;}
          ^~~~~~~~~~
prog.cpp:13:11: error: ‘Slytherin’ was not declared in this scope
     cout<<Slytherin<<endl;
           ^~~~~~~~~
prog.cpp:17:10: error: ‘Ravenclaw’ was not declared in this scope
    cout<<Ravenclaw<<endl;
          ^~~~~~~~~
stdout
Standard output is empty