answersLogoWhite

0

Java program using round function

Updated: 12/12/2022
User Avatar

Wiki User

14y ago

Best Answer

The following example rounds pi to an integer:

System.out.println(Math.round(Math.PI));

The following example rounds pi to an integer:

System.out.println(Math.round(Math.PI));

The following example rounds pi to an integer:

System.out.println(Math.round(Math.PI));

The following example rounds pi to an integer:

System.out.println(Math.round(Math.PI));

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

The following example rounds pi to an integer:

System.out.println(Math.round(Math.PI));

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Java program using round function
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a program using function that counts the number of vowels in a string in java language?

Use text-editor notepad++


Can we execute java program without main function?

no


In java public static voidmain function denotes what?

Java's main function denotes the entry point into the execution of your program.


What is the name of the function which must be defined in a Java program?

The main function. Every program must have a main function and it must be declared static.


Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'


What has the author Joe Weber written?

Joe Weber has written: 'Using Java 1.2' -- subject(s): Java (Computer program language) 'Using Java 1.1' -- subject(s): Java (Computer program language)


How do you execute a Java program?

You can run a Java application from the command line using "java <name of the class>"


Program for finding the current workload of PC using java?

There is no way to do this in Java without using either JNI calls or executing an outside, platform-specific program.


Can you run java program without applying main method?

yes we can run java program without using main. we can run program by declaring the variable static..


Discount program using java switch case?

This is not a question.


How do you run the frames in java?

first compile java program using "javac" then run frame using "appletviewer". e.x. = appletviewer filename.java


How do people make minecraft mods?

They program them using code and Java.