Plis tell me when to open the | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Plis tell me when to open the

curly braces and when to close the curly braces. this thing is confusing me. as there are two or more of them opened and being closed

22nd Feb 2017, 7:55 PM
stephen haokip
stephen haokip - avatar
1 Answer
+ 1
For an if-else argument, If (parameters) {argments}; Else {arguments} For example, If (x<2) {cout <<x;} Else {cout << "error";}
22nd Feb 2017, 9:40 PM
Thomas Kimball