Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int a, b, c;
- cin >> a >> b >> c;
- if(a <= 0 || b <= 0 || c <= 0) {
- cout << "ERROR";
- }
- else if(a + b <= c || a + c <= b || b + c <= a) {
- cout << 0;
- }
- else {
- if(a == b && a == c && b == c) {
- cout << 3;
- }
- else if(a == b || b == c || a == c) {
- cout << 2;
- }
- else {
- cout << 1;
- }
- }
- }
Add Comment
Please, Sign In to add comment