fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. /*
  4. //Zadanie 1
  5. int main(){
  6. int a, b, c;
  7. cin>>a>>b>>c;
  8. if (a<b) {if (a<c) cout<<a;
  9. else cout <<c;
  10. }
  11. else {
  12. if (c<b) cout<<c;
  13. else cout<<b;
  14. }
  15. return 0;
  16. }
  17.  
  18. //Zadanie 2
  19. int main(){
  20. int a, b, c;
  21. cin>>a>>b>>c;
  22. if (a=b){cout<<"tak";}
  23. else {if (a==c) cout<<"tak";
  24. else if (b==c) cout<<"tak";
  25. else cout<<"nie";
  26. }
  27. return 0;
  28. }
  29.  
  30. //Zadanie 3
  31. int main(){
  32. int x;
  33. cin>>x;
  34. if((x>=1 and x<=10) or (x>=17 and x<=21))
  35. cout<<"tak";
  36. else cout <<"nie";
  37. return 0;
  38. }
  39.  
  40. //Zadanie 4
  41. int main(){
  42. float x, y;
  43. cin>>x>>y;
  44. if (x*y==0) cout <<"punkt leż na osi.";
  45. else if (x>0)
  46. if(y>0) cout<<"punkt leży w 1 ćwiartce";
  47. else cout <<"punkt leży w 4";
  48. else if (y>0) cout<<"punkt leż w 2 ćwiartce";
  49. else cout <<"punkt leży w 3 ćwiartce";
  50. return 0;
  51. }
  52.  
  53. //Zadanie 5
  54. int main(){
  55. int a, b, c;
  56. cin>>a>>b>>c;
  57. a=a*a;
  58. b=b*b;
  59. c=c*c;
  60. if (a==b+c or b==a+c or c==a+b) cout<<"liczby pitagorejskie";
  61. else
  62. cout<<"to nie sa pitagorejskie";
  63. return 0;
  64. }
  65.  
  66. //Zadanie 6
  67. int main(){
  68. int x1, x2, x3, y1, y2, y3;
  69. cin>>x1>>x2>>x3>>y1>>y2>>y3;
  70. if (2*x3==x1+x2 && 2*y3==y1+y2)
  71. cout << "tak";
  72. else
  73. cout <<"nie";
  74. return 0;
  75. }
  76. */
  77. //Zadanie 7
  78. int main(){
  79. int a;
  80. cin >>a;
  81. if ((a%4==0 && a%100!=0) or a%400==0) cout<<"tak";
  82. else cout<<"nie";
  83. return 0;
  84.  
  85. }
Success #stdin #stdout 0.01s 5320KB
stdin
12 45 10
stdout
tak