C++ Python cout << "Hello, world"; print 'Hello, world', cout << "Hello, world" << endl; print 'Hello, world' cout << "i = " << i << endl; print 'i =', i cout << "x = " << x << endl; print 'x =', x cout << "j = " << j print 'j =', j, \ << " y = " << y << endl; 'y = ', y print 'j =', j, 'y = ', y cout << "result = " << sum << endl; print 'result =', sum printf("answers = %10.4f, %5d\n", z, i); print 'answers = {0:10.4f}, {1:5d}'.format(z, i)