Write a static method to return a double (parameter) rounded to the nearest 100th. Use the Math class' round method. Put this method in a class called My Math. Hints: multiply the double parameter by 100, round that, divide the rounded result by 100. Write a method to print a number (double parameter), its square and its cube, all rounded to the 100th, calling the round100th method created earlier in My Math class, but put this method in another class called Try My Math. Write a Java application program (main) that calls the method written earlier My Math class, passing Math .E in main. Put main in the Try My Math class.
Write a Java program that calculates area and perimeter of square in a function. Name Calculate Area and Calculate Perimeter respectively. The values that will be passed to the functions will be first input by user.
Write a Java program that calculates area and perimeter of square in a function. Name Calculate Area and Calculate Perimeter respectively. Pass the values to the function from main () while calling functions
Write a Java program that implements a function Check Even Odd that checks that a number input by user is even or odd
Write a Java program to print odd numbers less than 20 in a function.
Find and display the values of both sides of the following mathematical series expression and
an absolute difference of both sides. User can input either of angles in degree 90, 60, 30 etc.
sin(x) = x - ((x^3)/3!)+((x^5)/5!)-((x^7)/7!)+((x^9)/9!)
Once the user enters the angle in degrees. Your program should do the following (Write separate
functions for a, b, c, and d)
a) LHS Result
b) RHS Result
c) Difference
d) First term, series of two terms, series of three terms, series of four terms, series of five terms.
Write C++ program: Lets create your first cipher!!! Cipher is an algorithm that you can use to encrypt and decrypt sensitive information. In an information system, sensitive information is stored in a 16-bit unsigned number, where bit-wise information is stored in following format, 9-bits are reserved for account number and 7-bits are reserved for customer ID.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
C C C C C C C A A A A A A A A A
a) Using bit wise operators, write a function to extract customer ID
b) Another function to extract account number.
c) Due to security concerns, you have been given a task to create a cipher. Write a function to encrypt the 16-bit number (X) using the following expression.
y = aX + b, consider a = 5 and b = 233
d) Write another function to decrypt the number and display the original number.
Write a C++ program to Find and display the values of both sides of the following mathematical series expression and an absolute difference of both sides. User can input either of angles in degree 90, 60, 30 etc.
sin(x) = x − (x^3 / 3!) + (x^5 / 5!) − (x^7 / 7!) + (x^9 / 9!)
Once the user enters the angle in degrees. Your program should do the following (Write separate functions for a, b, c, and d)
a) LHS Result
b) RHS Result
c) Difference
d) First term,
series of two terms, series of three terms, series of four terms, series of five terms.
How to display the product of numbers divisible by 4 from 4 to 50 using do while loop