User Profile
Collapse
-
I mean, I know how to set one up where it will control the amount of times it goes but I need it to be infinite until the user enters '999'.Leave a comment:
-
-
Assesing the count?
Ok, I'm needing to write a program where it asks the user for a number until the number 999 is entered. It averages the sum and shows it to the user.
I think I have it all set up right. I just don't know how to get the count number to be able to divide the sum by.
Code is as such:
...Code:import java.util.Scanner; public class Lab7_Ex2 { public static void main (String -
Loop Error help?
I'm trying to create a program that creates the following:
*
**
***
****
*****
using loops.
But I keep receiving errors... and I can't figure out why.
Code is as such so far:
...Code:public class Lab7_Ex3 { public static void main(String[] args) { for (int i = 1; i=5; i++); { for (int -
Thanks that helped but how do I make it repeat if the number is invalid?Leave a comment:
-
Loop Repeat?
I'm writing a program where it asks a user a number between a range and then displays $ the number of times of the number entered.
But I'm needing to have this repeat 5 times (or more if an invalid number is entered).
EDIT:::: Got the repeat fixed, just needing to have it repeat if it goes to the else statement.
Here is my code so far.
...Code:import java.util.Scanner; public class Lab7_Ex1
-
Issues with Illegal characters =/
I wrote this program to calculate the income tax of a user depending on whether or not they were married:
...Code:import javax.swing.JOptionPane; public class Income_Tax { public static void main (String [] args) { String married = "yes"; String single = "no"; String status; String inputIncome; int income; double tax;
No activity results to display
Show More
Leave a comment: