#include <cstdio>
int main(){
char c = 'S';
float x = 7.0, y = 9.0;
double d = 6.548;
int i = 50;
printf("The float division is : %.3f / %.3f = %.3f
", x,y,x/y);
printf("The double value is : %.4f
", d);
printf("Setting the width of c : %*c
",3,c);
printf("The octal equivalent of %d is %o
",i,i);
printf("The hex equivalent of %d is %x
",i,i);
return 0;
}
int aclass::printf(const char * format, ...) {
if (this->silent > 0) return 0;
va_list arg;
int done;
va_start(arg, format);
done = std::vfprintf(stdout, format, arg);
va_end(arg);
return done;
}