Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9213073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:39:54+00:00 2026-06-18T01:39:54+00:00

I have this simple problem I’m trying to do. I’m trying to write a

  • 0

I have this simple problem I’m trying to do. I’m trying to write a program that doubles these five numbers. Then I want to compute the average of these numbers and print them out. The code runs with no errors, but it will not print my answer for some reason. How can I get it to print the output of the problem or simply print something? I am using Netbeans.

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package marina;

/**
 *
 * @author bax
 */
public class Precedence {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    // TODO code application logic here
    double grade1 = 100;
    double grade2 = 75;
    double grade3 = 88;
    double grade4 = 65;
    double grade5 = 99;
    int x = (int) (grade1+grade2+grade3+grade4+grade5/5.0);

    System.out.println(x);   

    }
}

Output:

run:
BUILD SUCCESSFUL (total time: 0 seconds)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:39:55+00:00Added an answer on June 18, 2026 at 1:39 am

    (Like I said in the comments:)

    Make sure you have your file open and press Shift + F6, which runs the current file. Notice that if you press just F6 then the main project will be run, not necessarily this project. Also, make sure you hit the Clean and build option, to clean up cache and so on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like a simple problem: I have a WF4 activity that guides the
file = [file1,file2,...].join( ) `paste #{file}` Hello, I have this simple problem that has
I have this simple problem that gets an input from the user using a
I have this simple autoloading script, the only problem is that I do not
I'm guessing this is a simple problem, but I'm just learning... I have this:
I have this simple code, using Joda-time. Works fine, but I have a problem.
hey guys having this really simple problem but cant seem to figure out have
I have a simple problem with XML got from database. Now, this XML can
I've wrote this simple piece of code. And I have a slight problem with
I am looking for a simple answer for this problem... I have a UITextView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.