Question: Question 5 Write a script that will generate a random integer, ask the user for a field width, and print the random integer with the
Question 5 Write a script that will generate a random integer, ask the user for a field width, and print the random integer with the specified field width. The script will use sprintf to create a string such as 'The # IS %4d ' (if, e.g., the user entered 4 for the field width), which is then passed to the fprintf function. To print (or create a string using sprintf) either the % or \ character, there must be two of them in a row % Place your code here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
