A classic problem when learning C++ is checking what type of triangle you have based on 3 sides given by the user. Let's see how to write this logic cleanly using if-else structures without nesting too many conditions.

#include <iostream>

using namespace std;

int main() {

double a, b, c;