What's the point of the NOT operator?
c++
Solution
Okay, you want to divide the sum of two numbers to a third one, so you can do this if the third number is not zero.
#include <iostream>
using namespace std;
int main()
{
int a,b,c,sum;
cin >> a >> b >> c;
sum = a+b;
if (c!=0) //which is equivalent to if(!c)
cout << sum/c;
}
I used an easy example in order to understand it quickly. Is everything okay now? Regards and good luck with your study.
Problem
Currently checking out C++ using this tutorial. It explains what the `! NOT` operator is, kind of, but I don't think I fully understand why I'd ever want to use it. Can someone please explain?