1.>
static void main(string []args)
{****************}
user enter a value
if the value is greater than 10 screen put the same number in front of you
else count to the 10 number ..
2-> private double fun(double x)
{*************************************}
where p.i=3.141592654;
y=-1;
if x =>0;
{
y=4th power of x;
y=4th power of cos(x+x*pi)/180;
and y=y+math.abs(y);
}
return y;
}
3-> 1 2 6
11 12 27
12 14 16.
Write a short paragraph explaining what the program below docs. In addition, tell what the output...
Write a Java program that has a method called arrayAverage that
accepts an arrary of numbers as an argument and returns the average
of the numbers in that array. Create an array to test the code with
and call the method from main to print the average to the screen.
The array size will be from a user's input (use Scanner).
- array size = int
- avergage, temperature = double
- only method is arrayAverage
Output:
Java Program: Write an algorithm (steps) using pseudocode (no java code required) explaining steps for a method which will reverse an integer array (Integer[]) without using any other data structure. The method should return the reversed integer array. E.g. If input array Integer[] integers = [1,2,3,4,5,6] should return [6,5,4,3,2,1]
Write program in JAVA with a method that returns an array. The method should accept as input a comma-delimited string with three values from a user. The array should store each value in a different element. Use Try..Catch error handling and print any failure messages, or print success from within method if execution is successful (see Chapter 13 in the text). Call the method from the main method of the program to demonstrate its functionality by looping through the array...
java
estion7 For this question, assume all input comes from the keyboard, and al output goes to the screen. Include method prototypes and comments. The array should have room for 100 integers Write a complete Java program, including at least one comment in the main propram and one in e to do the following: Write a main program which will call the methods described below (a) First the main program will read an integer (this integer is a parameter or...
CISC 1115 Assignment 6 Write a complete program, including javadoc comments, to process voter statistics Input to Program: A file containing lines of data, such that each line has 2 integers on it The first integer represents a zip code (in Brooklyn or the Bronx), and the second represents the number of voters in that zip code. Output: All output may be displayed to the screen. In main: 1. Your program will read in all of the data in the...
Language C Code Write a program that takes two integer arrays (A and B) and sums them together (element wise). A third array to accept the result should be passed in as the output argument. Assume the arrays are all the same size. The argument N is the size of the arrays. Your code should provide a function with the following signature: void array Addition (int A[], int B[], int N, int output[]) { } Your code must also provide...
JAVA HELP: Directions Write a program that will create an array of random numbers and output the values. Then output the values in the array backwards. Here is my code, I am having a problem with the second method. import java.util.Scanner; import java.util.Random; public class ArrayBackwards { public static void main(String[] args) { genrate(); print(); } public static void generate() { Scanner scanner = new Scanner(System.in); System.out.println("Seed:"); int seed = scanner.nextInt(); System.out.println("Length"); int length = scanner.nextInt(); Random random...
s Review View Tell me what you w AaBbccDc LT Normal Paragraph Write in a c program
Is the following program correct? If it is correct, what is the output? If it is incorrect, please correct the code and write down the output of the program. def fac(n): i=0 sum=0 while i<=n: sum*=i return sum def main(): print(fac(5)) main() PYTHON PLEASE
Write a C++ program that will test function described below that use pointers and dynamic memory allocation. Functions: You will write the function described below. Then you will call them from the main function, to demonstrate their correctness. concat_array: takes two int arrays and the arrays' sizes as arguments (that's 4 arguments). It should create a new array big enough to store both arrays. Then it should copy the contents of the first array to the new array, and then...