n1=1
n2=2
tot=n1+n2;
printf("%f",n1);
printf(" - "
;
printf("%f",n2);
printf(" = "
;
printf("%f",tot);
The above code should print
2 + 1 = 3
But I am using too many printfs. How can combine all the printfs into one printf
n2=2
tot=n1+n2;
printf("%f",n1);
printf(" - "
printf("%f",n2);
printf(" = "
printf("%f",tot);
The above code should print
2 + 1 = 3
But I am using too many printfs. How can combine all the printfs into one printf