# Search:

Type: Posts; User: napenthia

1. ## Thread: Would i use loop or if/else which reads a list of positive integers and calculate their average?

by napenthia
Replies
11
Views
1,662

### Re: Would You Use Loops and If/Else for This?

Thanks for posting it, I get how to use now, well sorta. But when doing the average, why is it that you have to put the (double) like that, I saw it in my book but it doesnt explain why.
On another...
2. ## Thread: Would i use loop or if/else which reads a list of positive integers and calculate their average?

by napenthia
Replies
11
Views
1,662

### Re: Would You Use Loops and If/Else for This?

ok i used the while loop with a sentinel value, and put the average at the end like you suggested here is what i got. would you mind posting the way you did it so that i can compare, and so that i...
3. ## Thread: Would i use loop or if/else which reads a list of positive integers and calculate their average?

by napenthia
Replies
11
Views
1,662

### Re: Would You Use Loops and If/Else for This?

ok so i change that, but i still need to find a way to calculate the average, would i still need the if statement then?
4. ## Thread: Would i use loop or if/else which reads a list of positive integers and calculate their average?

by napenthia
Replies
11
Views
1,662

### Re: Would You Use Loops and If/Else for This?

ok this is what i have so far but i am a little confused as how to incorporate the if statement in here, should i change anything?

import java.util.Scanner;

public class Main {

...
5. ## Thread: Would i use loop or if/else which reads a list of positive integers and calculate their average?

by napenthia
Replies
11
Views
1,662

### Re: Would You Use Loops and If/Else for This?

ok cool, im gonna try it out and ill post what i have for you to check but what kind of loop should i be using? I thought maybe a do while loop but im not sure

by napenthia
Replies
13
Views
792

### Re: Hey

Yeah! Its pretty good. i got it when i first come out, i havent had a chance to play it lately but it fun to play online with others
7. ## Thread: Would i use loop or if/else which reads a list of positive integers and calculate their average?

by napenthia
Replies
11
Views
1,662

### Would i use loop or if/else which reads a list of positive integers and calculate their average?

Design and implement an application that reads a list of positive integers values and calculate their average. List terminates with -1.

What I would like to know is would I be using the if/else...
8. ## Thread: What is cast operator and how to use it?

by napenthia
Replies
11
Views
2,632

### [SOLVED] Re: Need A Little Homework Help Please

thanks for all you help I think I got the hang of it
9. ## Thread: How to use decimal place when formatting an output?

by napenthia
Replies
2
Views
5,068

### [SOLVED] Re: How to Use Decimal Places

ok here is what I got for the second problem, hopefully its done right, if anyone wants to check it and tell me if i need to change anything i would like that

import java.util.Scanner;
import...
10. ## Thread: How to use decimal place when formatting an output?

by napenthia
Replies
2
Views
5,068

### [SOLVED] How to use decimal place when formatting an output?

Sorry, but someone please explain how to use decimal place when formatting an output? also could someone tell me if i am suppos to use an if else statement for my problem.

2) Write a program to...
11. ## Thread: What is cast operator and how to use it?

by napenthia
Replies
11
Views
2,632

### [SOLVED] Re: Need A Little Homework Help Please

ok i got it now im gonna start on the next one, but what I want to know is should I be using the if, else statement for this one as well?
also how do I use the decimal places?
12. ## Thread: What is cast operator and how to use it?

by napenthia
Replies
11
Views
2,632

### [SOLVED] Re: Need A Little Homework Help Please

oh ok I got i fixed it, can you check it for me and tell me if i need to fix anything, also when i try to get the number for numbers 1 though 9 to output the number the number wont come up so i was...
13. ## Thread: What is cast operator and how to use it?

by napenthia
Replies
11
Views
2,632

### [SOLVED] Re: Need A Little Homework Help Please

ok so based off of what you told me about so far this is what i was able to come up with but when i run it i dont get the letter for the output of the number am i missing something. im wondering if...
14. ## Thread: What is cast operator and how to use it?

by napenthia
Replies
11
Views
2,632

### [SOLVED] Re: Need A Little Homework Help Please

and im not asking you to do my work for if i were i would stright out say that, all im asking for are some pointers and if i need some help or have questions then ill ask them, im not so ignorant as...

by napenthia
Replies
13
Views
792

### Re: Hey

have either of you tried left 4 dead yet?
16. ## Thread: What is cast operator and how to use it?

by napenthia
Replies
11
Views
2,632

### [SOLVED] What is cast operator and how to use it?

1. Write a program that prompts the user to input an integer between 0 and 35. If the number is less then or equal to 9, the program should output the number; otherwise, it should output A for 10, B...
17. ## Thread: Difference between public and private variable and their uses

by napenthia
Replies
1
Views
1,538

### [SOLVED] Difference between public and private variable and their uses

What is the difference between public and private variables? When do I use each one?
18. ## Thread: Java program to prompt and display the user input number as odd or even

by napenthia
Replies
11
Views
1,290

lol thanks, i was trying to figure out what i was missing and i completely over looked it, thanks so much for the help

by napenthia
Replies
13
Views
792

### Re: Hey

I do play Halo but I havent tried Call of Duty yet, I love playing rainbow six though, well if you log on check out my profile it Moon Clover. I try to log on and play when I can but between school...
20. ## Thread: Java program to prompt and display the user input number as odd or even

by napenthia
Replies
11
Views
1,290

ok this is what i have so far but for the if, else statement it says that its an illegal start of an expression, is there a particular way I am suppose to implement an if, else statement?

...
21. ## Thread: Java program to prompt and display the user input number as odd or even

by napenthia
Replies
11
Views
1,290

ok, so then how do i go about calculating the perimeter? Do I use the Math algorithm?

by napenthia
Replies
13
Views
792

### Re: Hey

yeah i do have the xbox 360, this is one of my favorite gaming systems so far
23. ## Thread: Java program to prompt and display the user input number as odd or even

by napenthia
Replies
11
Views
1,290

ok I understood the first part and thank you for the help and what I have started with for the second part is this

public static void main(String[] args) {

Scanner scan =...

by napenthia
Replies
13
Views
792

### Hey

Hey, Im Napenthia and I am new to programming. I am currently taking a computer programming course in school and it includes some java, for the most part I understand the simple things but I need a...
25. ## Thread: Java program to prompt and display the user input number as odd or even

by napenthia
Replies
11
Views
1,290

### [SOLVED] Java program to prompt and display the user input number as odd or even

1. Write a program that prompts the user to input an integer. The program should then output the number and a message saying whether the number is odd or even.

2. Rectangle packages (boxes) may...
Results 1 to 25 of 25