1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alekssr [168]
4 years ago
12

*/ What's wrong with this program? /* public MyProgram { public static void main(String[] args); } int a, b, c \\ Three integers

a = 3 b = 4 c = a + b System.out.println('The value of c is' + C); {
Computers and Technology
1 answer:
gulaghasi [49]4 years ago
6 0

Answer:

A lot is wrong with the program given in the question. See the corrected version below:

<em>public class ANot {</em>

<em>    public static void main(String[] args) {</em>

<em>        int a, b, c;</em>

<em>    //Three integers</em>

<em>    a = 3; b = 4; c = a + b;</em>

<em>        System.out.println("The value of c is " + c);</em>

<em>    }</em>

<em>}</em>

Explanation:

Errors:

1. The main method had a semi colon after it. This is wrong

2. An open brace was supposed to follow the main method

3. The declaration of the variables was supposed to end with a semi colon

4. the correct comment style is // and not \\

5. Initialization of variables was supposed to end with semi colons

6. The output statement had C and not c which is the declared and initialized variable..Java is strictly typed

7. Open and closing braces for the class and method wrongly placed

You might be interested in
Which printout will result from the snippet of code?
Anna35 [415]

Answer:

These are the supplies in the list:  

[‘pencil’, ‘notebook’, ‘backpack’, ‘pen’, ‘calculator’]

Explanation:

The line return (\n) character will be in the output (so there will be a change of line), but it will NOT be visible as it would have been interpreted as a special character.

So the output will be on 2 different lines, with no \n visible.

If the command would have been: print('These are the supplies in the list:\n', supplies), with single quotes (') instead of double quotes (") then then \n would have been printed but not interpreted as a special character.  At least in most computer language.  Since we don't know of which language the question refers to, we can't be sure at 100%.

7 0
3 years ago
What's internet reendorsement?
Soloha48 [4]
Good question. When one Endorces or "Hires/ payes" someone again for a job/thing they did. I think. :)
6 0
3 years ago
____ is scientifically seeking and discovering facts.
galina1969 [7]

Answer:

I believe it is science, but before you do anything with this answer, research more on it, just in case I'm wrong! :)

Explanation:

3 0
3 years ago
When you do not see any students while driving in a school zone, you should
Karolina [17]
Isn’t this for a online drivers test thing...? I believe you might want to figure this or on your own I’m sorry
6 0
3 years ago
This is computer and programming
miv72 [106K]

Answer:yes

Explanation:because

3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program in pascal to solve a quadratic equation
    12·1 answer
  • Which type of attack modifies the fields that contain the different characteristics of the data that is being transmitted?
    7·1 answer
  • Which zone of the ocean is deepest ?
    7·2 answers
  • Technician A says you should measure the parasitic load immediately after the vehicle is turned off. Technician B says you shoul
    10·1 answer
  • Are you concerned that strangers may have access to the personal information you share on social media platforms? Why or why not
    10·1 answer
  • Fill in the blank to complete the sentence. -------------------- is used to store and process data over the Internet using compu
    10·1 answer
  • 8.
    9·1 answer
  • Which item was key to how Microsoft got its start in the 1970s? a. artificial intelligence b. vacuum tubes c. Altair 8800 d. UNI
    11·1 answer
  • How is information processed within a<br> motherboard between the hard drive, CPU and RAM,
    12·1 answer
  • What is the correct format to use when<br> inserting a date in Excel?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!