Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

>> REGISTER NOW TO START POSTING

# Thread: hello need help with my first assignments

1. ## hello need help with my first assignments

can anyone help me solve these assignments in java
1
The manager of a football stadium wants you to write a program that calculates the total ticket sales after each game. There are four types of tickets: (i) box, (ii) sideline, (iii) premium and (iv) general admission. After each game, data is input from the keybord in the following form:
ticketPrice numberOfTicketSold
.
.
.
Sample data are shown below:
250 5750
100 28000
50 35750
25 18750
The first line indicates that the box ticket price is \$250 and that 5750 tickets were sold at that price.
Your program must output the number of tickets sold and the total sale amount.

2

Write a program to perform the following steps:a) Prompt the user to enter two integers: firstNum and secondNum. (firstNum must be less than secondNum.)b) Output all the odd numbers between firstNum and secondNum inclusive.c) Output the sum of all the even numbers between firstNum and secondNum inclusive.d) Output all the numbers and their squares between 1 and 10.e) Output the sum of the squares of all the odd numbers between firstNum and secondNum inclusive.f) Output all the uppercase letters.

if anyone have any idea how to solve these plz help thanks
alse if anyone can give me a tip or 2 to get better at java programming in general thank u

3. ## Re: hello need help with my first assignments

as i said before iam still new so i still suck at this here is my first code for the first one
```import java.util.;
class totalticket{

public static void main( string[]){

Scanner console= new Scanner (system.in);

System.out.println("Enter box ticket price:");
box = input.nextint();

System.out.println("Enter sideline ticket price:");
sideline = input.nextint();

System.out.println("Enter general ticket price:");
box = input.nextint();

system.out.println("sum"+sum);
}
}```
yea iknow its a mess

4. ## Re: hello need help with my first assignments

Can you explain what your problem is?