Am I suppose to use curly braces in if statements
In my textbook it shows if statements without curly braces
like this
or is it suppose to be like thisCode:if(x=0)
cout<< x << "is 0" <<endl;
Code:if(x=0){
cout<< x << "is 0" <<endl;
}
or is there a difference between both because my professor gave me a sample code and he had curly braces in there