Intro to Java Programming 18 - printf

preview_player
Показать описание
In which we discuss yet another way to print text to the screen, the printf method.

if you have any questions leave a comment below and i'll try to get back to you as soon as possible. if not, hopefully someone else can assist you.
Рекомендации по теме
Комментарии
Автор

You saved me from having a B in Comp Science. We had to do these labs where you add the perimeter, sum, average, surface area, area of a circle, slope of a line and Fahrenheit to Celsius conversion. I didn't understand how to make the printf statements work, but now I do. Thanks a lot!

willmckee
Автор

%d is only for int, %f is for both float & double

dalalalghomlas
Автор

LPparty...alrigth first thing is that you need to take the exam score = part out of that source code.
Now you declared the Variable Test as a double and assigned it the value 12.3343. Now you are using the System.out.printf method...it goes like this...first you state how you want it to be formatted...by using "%f" you put numbers in front of the f to say how many spaces you want before it is printed. So it would simply be System.out.printf("%f", Test); put the thing you want to print after

Mrsthebest
Автор

But where the console. I heard that a console is suppose to pop up

Lucario
join shbcf.ru