No, the directions said ctrl/press z then Enter key....
Type: Posts; User: brobertson300
No, the directions said ctrl/press z then Enter key....
So here are my directions for this program:
Write a program that allows the user to enter students names followed by their test scores and outputs the following information(assume that the maximum...
What do you mean by high level?... I have not worked out the "details" do I make some sort of loop? maybe a for loop or should i use the switch method? and if i use a for loop how would I get a...
Right I could use the Scanner class and use nextInt method 3 times and assign them to a variable. I will definitely do that. The program needs to read those numbers and keep a running total of the...
Norm, I dont have anything as of yet... I think I need to assign the date to a number then keep a running count until December 31st. I am unsure of how to just single out the month and day from the...
Hello, I need help with figuring out the logic to print the day number of the year. The directions for my homework are: Write a program that prints the day number of the year, given the date is in...
okay so....
public static double m(double i)
{
double sum = 0;
sum += (double) (i / (2*i + 1));
total = sum + sum
return total; //Will this return the accumulative...
I understand it is a poor name for a method however thats what the teachers instruction are. Do I need to call the method into my println?
--- Update ---
import java.text.DecimalFormat;
...
When I compile it shows the 'i' = 1,2,3,4....20 but the m(i) is 0,0,0,0.... and needs to be 0.3333, 0.7333.... all the way to 9.2480... its supposed to add all the fractions together and display......
Okay so I have to write a method to compute the following series: m(i)= 1/3 + 2/5 +....+ (i / 2i+1) and write a test program that displays a table " i = m(i)" 1=0.3333 2=0.7333....all the way down...
Is my updated version OK? It seems to do what I need it to do...
Okay I got it to compile and run. However, now it always returns not prime. I think its because i set boolean notPrime = true; but, if I dont set it to anything it says that notPrime needs to be...
So I need to just add a guaranteed return statement and it will be fine? My coding is okay?
--- Update ---
I keep trying to add another return statement and cant seem to figure it out. Can you...
Not sure I follow you, Norm. So there should only be one return statement?
--- Update ---
Should there not be a for loop in the method?
Im having trouble with my method return. I am new to using methods and cant seem to grasp the idea on the return part. I have to write a method that tells if a number is prime or not. This is what I...
Okay I tried and I am still getting the same output. I think I am actually thinking about it all wrong. My code is right but i was thinking it should just divide the last number and get my result...
Okay for the life of me I cannot get the right output for my program. I need to get the total number of pennies in dollar amount for the output of Total Pay. This is my program. The directions are:
...
Yes I am familiar with \n however that is not what I was suggesting. I think because my output is in a loop it prints everything rather then just one statement and then the multiple outputs im...
import java.util.Scanner;
public class twoIntegers
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
//Part A
just use if and if else statments to tie it all together?
This is my whole program so far... steps A through E. The directions again are posted above. I am just piecing together what I know. The logic is there but the format definitely isnt.
import...
Can you show me a example? not with my assignment but something general? I am a visual learner. I am not asking for someone to do my assignment becasue i want to learn it but i also need something...
int i = firstNum;
int sum = 0;
while(i <= secondNum)
{
if(i % 2 == 0)
{
System.out.println(i);
sum += i;
}