Write a Java program with Counter-Controlled Loop to output the following:
N 10*N
100*N 1000*N
1
10
100
1000
2
20
200
2000
3
30
300
3000
4
40
400
4000
5
50
500
5000
The output should look as shown above. The columns should be properly aligned.
//main class definition
public class Main
{
//main function definition
public static void main(String[] args) {
//print the header line
System.out.println("N\t10*N\t100*N\t1000*N");
//for loop to traverse from 1 to
5
for (int i=1; i<=5; i++) {
//calculate each expression and
print the corressponding value
System.out.println(i + "\t" + 10*i
+ "\t" + 100*i + "\t" + 1000*i);
}
}
}
![//main class definition public class Main { //main function definition public static void main(String[] args) { //print the h](http://img.homeworklib.com/questions/ec08b110-f24c-11eb-a6a4-c5fd657e32c1.png?x-oss-process=image/resize,w_560)
Write a Java program with Counter-Controlled Loop to output the following: N 10*N 100*N 1000*N 1 ...
Table 9-1 Output Consumption Investment Net Exports 1000 800 500 100 1500 1200 500 100 2000 1600 500 100 2500 2000 500 100 3000 2400 500 100 3500 2800 500 100 4000 3200 500 100 ____ 12. In Table 9-1, the equilibrium level of output is a. 2,500. b. 3,000. c. 3,500. d. 4,000. ____ 13. In Table 9-1, at output of 4,000, inventories are a. decreasing by 200. b. increasing by 200. c. increasing by 300. d. decreasing by...
Question 2 The market for barley has the following demand and supply schedule. Price (RM) 100 200 300 400 500 600 Quantity demanded (tonnes) 7000 6000 5000 4000 3000 2000 (tonnes) 1000 2000 3000 4000 5000 6000 (a) State the price, quantity and revenue received at equilibrium. 18 marks] Study shows that barley is good for diabetics. The quantity demanded is increased by 2000 tonnes. Determine the new quantity demanded, price (i) and quantity. 6 marks] (b) Calculate the new...
Select two data values from your raw data – one that is inside of the confidence interval and one that is outside – one must be at the high end of the data and one at the low end – and construct two hypothesis tests, one for each value. One of the tests should be a “less than”, the other should be a “greater than”, depending on the value being tested. Use a 95% level of confidence, and showcase Ho...
This assignment involves 2 Java programs 1) Write a Java program to read a CSV (Comma separated values) text file. The text file will contain comma separated values in each line. Each line contains data in this format: String(20), String(5),String(10), double. There will be multiple lines with each line containing the same number of values. Ask the user to enter the path for the CSV file for reading the file. After reading the data from the file output the data...
Identify the following ir spectrum 100 Transmittance *T D 0 4000 3000 1300 1000 100 2000 wavenumber om ethyl vinyl ether 2-butanone 2-methylpropanal 2-methyl-2-propen-1-ol Identify the following ir spectrum Transmittance T E 4000 1000 1500 1000 300 1000 wavenumber cm 2-methylpropanal 2-methyl-2-propen-1-ol ethyl vinyl ether 2-butanone Identify the following ir spectrum 100 mm Transmittance ** ly B 500 1000 1100 1000 1000 1000 wavenumber em: O2-methyl-2-propen-1-ol 2-methylpropanal 2-butanone ethyl vinyl ether Identify the following ir spectrum 100 พา Transmittance NT...
Question #1 (10 Marks) 500 1000 1500 2000 2500 3000 3500 200 650 1100 1550 2000 2450 2900 3350 100 100 100 100 100 100 100 1005001600 250 500 500 500 500 500 500 500 1400 50 200 1000 400 125 600 S0 8001O 1000 2000 1200 8SD 400 400 400 Complete the Total Planned Expenditure (AE) column for all levels of income (Y) on the above table. a) What is the consumption function? Complete the equation. C- 200 b)...
Write a program in Java that converts the following do-while loop block to: for loop Write, compile and run below program segment. Make sure to click on the Output Window to input the number. Evaluate the program. Take notes and comment of below program segments of your observations. int x; Scanner input = new Scanner(System.in); x = input.nextInt(); do{ System.out.printf(“%d\n”, x * 2); x++; } while(x < 100);
1. Write a Java program to implement Counting Sort and write a driver to test it. Note: use random number generator to generate your input with n = 10, 50, and 100. Verify that the running time is O(n). 2. Write a Java program to implement Bucket Sort and write a driver to test it. Note: use random number generator to generate your input with n = 10, 50, and 100. Verify that the running time is O(n). 3. In...
several possible correlations: −1.2,
−0.980, −0.23, 0,
0.299, 0.767, 1, 12
Below are three scatterplots. For each scatterplot, select the
correct correlation from the list. (Not all will be matched.)
Briefly explain answer.
(A) 500 (B) (C) 100 400 5 95 300 90 200 85 100 1 80 20 30 1 40 1 50 60 70 500 1000 1500 2000 2500 3000 3500 Area (square feet) 0 500 1000 1500 2000 2500 3000 3500 Area (square feet) Mean Age
use java thanks 1.Given the following arrays, write a Java program to generate the output below. String [] item = {"milo", "water", "coke", "tea", "coffee"}; double [] price = {3.00, 1.00, 5.00, 2.00, 3.50}; int [] quantity = {200, 500, 350, 100, 700}; Re-write Question 1 using array list and display the sale of the day report. Re-write Question 1 using 2-dimensional array and display the sale of the day report. Write a segment program to replace...