What is the output of the following program? 1 public class Weird { public static void main
Question:
What is the output of the following program?
Transcribed Image Text:
1 public class Weird { public static void main (String [] args) { int number 8; %3D 4 halfTheFun (11); halfTheFun (2 - 3 + 2 * 8); halfTheFun (number); 7 System.out.println ("number = " + number); 8. 9. 10 public static void halfTheFun (int number) { 11 number = number / 2; 12 for (int count = 1; count <= number; count++) { System.out.print (count + " "); 13 14 } 15 System.out.println (); 16 17 3.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 64% (17 reviews)
Output of Wei...View the full answer
Answered By
Utsab mitra
I have the expertise to deliver these subjects to college and higher-level students. The services would involve only solving assignments, homework help, and others.
I have experience in delivering these subjects for the last 6 years on a freelancing basis in different companies around the globe. I am CMA certified and CGMA UK. I have professional experience of 18 years in the industry involved in the manufacturing company and IT implementation experience of over 12 years.
I have delivered this help to students effortlessly, which is essential to give the students a good grade in their studies.
3.50+
2+ Reviews
10+ Question Solved
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted:
Students also viewed these Computer science questions
-
What is the output of the following code segment? t = 10; if(t > 7) { System.out.print("AAA"); System.out.print("BBB"); } a. AAA b. BBB c. AAABBB d. Nothing
-
What is the output of the following code segment? t = 0; if(t > 7) System.out.print("AAA"); System.out.print("BBB"); a. AAA b. BBB c. AAABBB d. Nothing
-
What is the output of the following code? b = 1; while(b < 4) System.out.print(b + " "); a. 1 b. 1 2 3 c. 1 2 3 4 d. 1 1 1 1 1 1...
-
Find the deflection y(x) of a cantilever beam embedded at its left end and free at its right end when the load is as given in Example 10.
-
A steady-flow compressor is used to compress helium from 15 psia and 70F at the inlet to 200 psia and 600F at the outlet. The outlet area and velocity are 0.01 ft2 and 100 ft/s, respectively, and the...
-
Holligan Publications established the following standard price and costs for a hardcover picture book that the company produces. Holligan planned to make and sell 30,000 copies of the book. Required...
-
Find the Fourier series of each function \(f(x)\) of period \(2 \pi\). For each series, plot the Nth partial sum, \[S_{N}=\frac{a_{0}}{2}+\sum_{n=1}^{N}\left[a_{n} \cos n x+b_{n} \sin n x ight]\] for...
-
Amanda M is a regional manufacturer and wholesaler of high-quality chocolate candies. The companys sales and collection process is as follows. Amanda M makes use of an enterprise-wide information...
-
View Policies Current Attempt in Progress In its first month of operation, Larkspur Company purchased 104 units of inventory for $6, then 208 units for $7, and finally 136 units for $8. At the end of...
-
Cost allocation to divisions. Forber Bakery makes baked goods for grocery stores, and has three divisions: Bread, Cake, and Doughnuts. Each division is run and evaluated separately, but the main...
-
What sort of figure will be drawn by the following program? Can you draw a picture that will approximately match its appearance without running it first? 1 import java.awt.*; 3 public class Draw7 {...
-
Write a program that computes the spherical distance between two points on the surface of the Earth, given their latitudes and longitudes. This is a useful operation because it tells you how far...
-
In problem use the improved Eulers method to obtain a four-decimal approximation of the indicated value. First use h = 0.1 and then use h = 0.05. y' = 1 + y 2 , y(0) = 0; y(0.5)
-
Teall Corporation has a standard cost system in which it applies manufacturing overhead to products on the basis of standard machine-hours (MHS). The company has provided the following data for the...
-
Joplin Laminating Corporation reported income before income taxes during the first three quarters, and management's estimates of the annual effective tax rate at the end of each quarter as shown...
-
Experiment 3: Create a graph of mass (y-axis) versus volume (x-axis) for iron. Display the trendline. Using your graph, what is the density of iron? density of iron: Calculate the volume of a sample...
-
13. What is the yield to maturity for a bond (with a par value of $1,000) paying $12 monthly coupons that has 6 years until maturity and sells for $1,000?
-
1. Prove that two colliding particles cannot transform into a single photon. 2 . Explain why a photon that strikes a free electron cannot be absorbed: ???? + ???? ???? . Such a reaction does take...
-
What is the mixed-strategy Nash equilibrium for the game in Exercise 1.7?
-
Reduction in sales All of the above 29. Belt of an electric motor is broken, it needs a. Corrective maintenance b. Scheduled maintenance c. Preventive maintenance d. Timely maintenance. 30. The...
-
How many IP addresses and how many link-layer addresses should a router have when it is connected to five links?
-
Figure 9.7 shows a system as either a host or a router. What would be the actual entity (host or router) of system A and B in each of the following cases: Figure 9.7 a. If the link is the first one...
-
Define framing and give the reason it is needed.
-
models in healthcare that apllies to communication and socio - economic influences
-
ezto.mheducation.com/ext/map/index.html?_con=con&external_browser=0&launchUrl=https%253A%252F%252Fnewconnect.mhe xam 2 (Chapters 6 & 7) 10. Problem (2 parts) 10 2 Dints 00:57:28 Saved You loaned...
-
Research for a bond mutual fund offered here in the Philippines A. Name of theFund B. The composition of the Fund C. When is the Inception Date of the Fund D. Explain the current net asset value per...
Study smarter with the SolutionInn App