# hello need help with my first assignments

• April 5th, 2013, 06:35 AM
helpoof
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 :)
• April 5th, 2013, 06:39 AM
Norm
Re: hello need help with my first assignments
• April 5th, 2013, 07:39 AM
helpoof
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
Code java:

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
• April 5th, 2013, 07:54 AM
Norm
Re: hello need help with my first assignments
Can you explain what your problem is?