want to change all printf to cout with keeping the same output

#include <iostream>
    using namespace std;Heading Here


void main()
{
    unsigned int a,b,c;
    char*format1 , *format2;
    format1 = "%04x%s%04x=%04x \n";
    format2 = "%c%04x=%04x \n";
        a = 0x0ff0;
        b = 0xf00;


        c=a>>4;
        printf (format1,a,">>",4,c);
        c=a&b;
        printf (format1,a,"&",b,c);
        c=a|b;
        printf (format1,a,"|",b,c);
        c=a^b;
        printf (format1,a,"^",b,c);
        c=~a;
        printf (format1,a,"~",b,c);


        system("Pause");
}