for k=1:100
fprintf('if(A%d=$C%d,1,if(A%d=0,0,-.33))+',k,k,k);
end
The above will write a single line to the Command Window with all the if statements. If you want each statement on a separate line, just add \n to the end of the string
fprintf('if(A%d=$C%d,1,if(A%d=0,0,-.33))+\n',k,k,k);