I solved it
Type: Posts; User: CSUTD
I figured it out but don't know how to delete a post.
public static void main(String [] args)
{
Scanner keyboard = new Scanner(System.in);
int num = 0;
int num_of_rows = 1;
while(num < 1 || num > 10)...
Not working, I may have done it wrong.
I enter 2 it prints out "$$" and the "The number you entered is invalid". Even if I enter 20 it says the same thing. But it doesn't ask for the user to enter...
Yes, that is correct.
So, a while loop would be the thing to use?
Right now my code is generating half of what it is supposed to.
Program asks the user to enter a number from 1 to 10.
Enter 7
output will be $$$$$$$
I'm having issues with my if...
Can't use arrays. Even if we were I wouldn't know how. I am in an intro class. I only know to a certain point.
Can I ask why you didn't think my code produced what it should.
um, if you...
This is my output:
Enter some numbers: 2
You entered numbers 2.
Your total are 2
Enter some numbers: 7
You entered numbers 7.
Is there a simpler way to print everything out on two lines?
Example:
You entered numbers 2,7, 3, and 0.
Your totals are 2, 9, and 12.
{
Scanner keyboard = new Scanner...
I need a little help.
Not sure where to go from here.
public static void main(String[] args)
{
Scanner keyboard = new Scanner (System.in);
That is all you had to say...I saw it after you mentioned this.
Thanks
public static void main(String[] args)
{
int income = 0;
char answer;
String student, input;
Scanner keyboard = new Scanner (System.in);
...
package lab4_ex2;
import java.util.Scanner;
public class Lab4_Ex2
{
public static void main(String[] args)
{
double firstTest,secondTest, thirdTest;
I know how to do the rest of it...didn't need it done for me. I just wanted to know if the first part was correct.
I want to make sure I am doing this programming assignment the right way.
Question:
Your history instructor gives three tests worth 50 points each. You can drop one of the first
two grades....
I figured it out but don't know how to delete a thread.
This isn't a what is wrong with my code thread. It is a thread about why my program does what it does.
package example1;
import java.util.Scanner;
public class example1
{
Thanks, glad to help.
I figured it out
Final code:
public static void main(String[] args)
{
Scanner keyboard = new Scanner (System.in);
public static void main(String[] args)
{
Scanner keyboard = new Scanner (System.in);
float x;
int y;
char ch1, ch2;
String name;
...