The statement System.out.printf("%3.1f", 1234.56) outputs ___________.
a. 123.4
b. 123.5
c. 1234.5
d. 1234.56
e. 1234.6
e .1 specifies one digit after the decimal point. The rest is rounded up. So 1234.56 is displayed 1234.6.
You might also like to view...
The operating system that introduced the Aero interface and the Sidebar feature was _________. A. Windows Vista B. Windows XP C. Windows 98 D. Windows 3.1
Fill in the blank(s) with the appropriate word(s).
On the History button, Web sites are stored in the order in which you visited sites today, but you can sort them in other ways
Indicate whether the statement is true or false
A(n) ________ fill uses shape fills such as marble or cork
A) image B) gradient C) texture D) picture
Trace the execution of the loop below for an input of 32. Modify the code segment so that it uses a for loop instead of the while loop.
1 num1 = 1; 2 cout << "Enter a number=> "; 3 cin >> num2; 4 while ((num2 % 13) != 0) { 5 cout << num1 << " " << num2 << endl; 6 num1 += 1; 7 num2 -= 3; 8 } 9 cout << num2 << " is divisible by 13." << endl;Line Number num1 num2 Effect ? ?