I'd like to compare a few variables to see whether they match a certain number if strung together for example

Code:
if (("%d%d%d", first, second, beg) == "2000");
Any help is greatly appriciated.