#include using namespace std; int main() { int i = 5; float j = 10.0; char k = 'A'; string l = "This is a string"; // demonstrate formatted output with various object types printf("i = %d, j = %f; k = %c, l = %s\n", i, j, k, l.c_str()); // demonstrate formatted input with various object types char s[80]; cout << "Enter an integer, a float, a character, and a string\n\t>> "; scanf("%d%f%c%s", &i, &j, &k, s); l = s; // demonstrate formatted output with various object types printf("i = %04d, j = %6.4f; k = %6c, l = %s\n", i, j, k, l.c_str()); return 0; }