# Search:

Type: Posts; User: brobertson300

Page 1 of 2 1

## Search: Search took 0.22 seconds.

by brobertson300
Replies
3
Views
267

No, the directions said ctrl/press z then Enter key....

by brobertson300
Replies
3
Views
267

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...
3. ## Thread: Help with logic to find the day number of the year

by brobertson300
Replies
7
Views
366

### Re: Help with logic to find the day number of the year

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...
4. ## Thread: Help with logic to find the day number of the year

by brobertson300
Replies
7
Views
366

### Re: Help with logic to find the day number of the year

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...
5. ## Thread: Help with logic to find the day number of the year

by brobertson300
Replies
7
Views
366

### Re: Help with logic to find the day number of the year

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...
6. ## Thread: Help with logic to find the day number of the year

by brobertson300
Replies
7
Views
366

### Help with logic to find the day number of the year

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...

by brobertson300
Replies
9
Views
566

### Re: writing a method to add fractions?

okay so....

public static double m(double i)
{
double sum = 0;
sum += (double) (i / (2*i + 1));
total = sum + sum

by brobertson300
Replies
9
Views
566

### Re: writing a method to add fractions?

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;
...

by brobertson300
Replies
9
Views
566

### Re: writing a method to add fractions?

2829

by brobertson300
Replies
9
Views
566

### Re: writing a method to add fractions?

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......

by brobertson300
Replies
9
Views
566

### writing a method to add fractions?

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...

by brobertson300
Replies
9
Views
378

Is my updated version OK? It seems to do what I need it to do...

by brobertson300
Replies
9
Views
378

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...

by brobertson300
Replies
9
Views
378

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...

by brobertson300
Replies
9
Views
378

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?

by brobertson300
Replies
9
Views
378

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...

by brobertson300
Replies
2
Views
400

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...

by brobertson300
Replies
2
Views
400

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:
...

by brobertson300
Replies
28
Views
855

2799

by brobertson300
Replies
28
Views
855

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...

by brobertson300
Replies
28
Views
855

import java.util.Scanner;

public class twoIntegers
{
public static void main(String[] args)
{

Scanner keyboard = new Scanner(System.in);

//Part A

by brobertson300
Replies
28
Views
855

just use if and if else statments to tie it all together?

by brobertson300
Replies
28
Views
855

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...

by brobertson300
Replies
28
Views
855

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...

by brobertson300
Replies
28
Views
855