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");
}

post your attempt to solve the problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.