![]() ![]() Finally, display the result of the expression to its nearest whole number. Take the values of a, b and c as input from the console. Write a program to calculate the value of the given expression: Solutions to Unsolved Java Programs Question 1 If argument is float, return type is int, if argument is double, return type is long.Īt mid-point, it returns the integer that is evenĪt mid-point, it returns the higher integer.Ī will have a value of 2 and b will have a value of 3 Your email address will not be published. Be the first to review APC : ICSE Understanding Computer Applications with BlueJ : Class IX (9788177396317) Cancel reply. ![]() It rounds off its argument to the nearest mathematical integer and returns its value as an int or long type. ICSE Understanding Computer Applications with BlueJ : Class IX (9788177396317) Author: Vijay Kumar Pandey. It rounds off its argument to the nearest mathematical integer and returns its value as a double type. Math.rint() and Math.round() Math.rint( ) In this example, b will be assigned the value of 65.0 as it is the largest integer smaller than 65.5. In this example, a will be assigned the value of 66.0 as it is the smallest integer greater than 65.5. It returns the largest double value that is less than or equal to the argument and is equal to a mathematical integer. It returns the smallest double value that is greater than or equal to the argument and is equal to a mathematical integer. Math.ceil() and Math.floor() Math.ceil( ) Both return type and argument is of double data type. It returns the natural logarithm of its argument. ![]() It returns the cube root of its argument as a double value. Data type of the two arguments and the return type of this method is double. It returns the value of the first argument raised to the power of the second argument. It returns a positive double value, greater than or equal to 0.0 and less than 1.0. Math.exp(p) Explain the following functions Question 1 To find the absolute value of a number y. Math.round() returns the value in float data type.įalse Write down the syntax for the following functions Question 1 Java.Math class is used for different mathematical functions. The return data type of Math.log() is double. ⇒ b = 12.0 State True or False Question 1 Reason - Math.ceil() returns the smallest whole number greater than or equal to its argument. What will be the final value stored in the variable b? Given double b = Math.ceil(3.4) + Math.pow(2,3) Reason - Math.rint(-9.4) will give -9.0 as it is nearest integer to -9.4. What will be the final value stored in the variable k? Given: double k = Math.rint(-9.4) + Math.sqrt(9.0) So, data type of variable d will be double. Here, the arguments are of double data type hence, Math.min() will return a double value. Reason - The return data type of Math.min() function depends on its arguments. What data type will you refer for the variable d? Reason - ceil() returns the whole number greater than or equal to the number and max() returns the greater number between its arguments. What will be the final value stored in the variable m? Math.abs() returns the absolute value of its argument so the final output is 9.0. As -9.0 is the largest mathematical integer less than -8.35 so it is returned in this case. Reason - Math.floor() method returns the largest double value that is less than or equal to the argument and is equal to a mathematical integer. What will be the final value stored in the variable p? The programming examples have been tested on the computer.Chapter 1 - Unit 6 Mathematical Library Methods Class 10 - APC Understanding Computer Applications with BlueJ.Each chapter contains a number of review questions and exercises which are carefully designed to provide an insight into the subject.The illustrations of the book make the entire text matter interesting and come alive.The book is extremely well written with excellent presentation.The book offers basic and comprehensive knowledge of the subject, which clearly reflects true workmanship of the authors.The topics are explained in simple English and in a systematic way so that the students can understand easily.The book UNDERSATNDING COMPUTER APPLICATIONS WITH BLUEJ contains a number of special features: Simple and lucid language has been used to avoid any confusion in programming. Special efforts have been put in to devise the content comprehensive, concise and practical. An easy to learn approach has been adopted throughout the book. Starting with an introductory chapter, the book covers all the features of Java Programming as prescribed by ICSE. ![]() The book “Understanding Computer Applications with BlueJ” for Class IX has been prepared keeping in mind the requirements of beginners as well as those who have a keen desire to study programming in Java with BlueJ. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |