| | |
help please
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2008
Posts: 11
Reputation:
Solved Threads: 0
i have java assignment >>
i need any one to help me to solve it >>
this is my e-mail >>> [email removed]
...............................
Java Assignment 3
1.Use nested loops that print the following pattern:-
A) 1
12
123
1234
12345
123456
2.Write a program to compute the sum and product of all odd integers from 1 to 19.
3.write a program which writes the integers from 1 to 50, replacing every multiple of (5) by the word "OK" and every integer divisible by (11) by the word "FINE"
Ex.
1 2 3 4 OK 6 7 8 9 OK FINE 12 13 14 OK….....
4.Write a program that read a list of numbers from the user, storing them in one dimension array, then prints them in the opposites order.
Example
Input :- 5 8 7 1 12 10 78 14 5 32 15
Output:- 15 32 5 14 78 10 12 1 7 8 5
5.Write a program to find the positions and number of zeros in two dimension array of integer.
6.Write a program that reads a student’s test scores in the range of 50-100. It should then determine the number of students having scores in each of the following ranges: 50-59, 60-69, 70-79, 80-89, 90-100.
Note: use one dimension array to store the students score.
i need any one to help me to solve it >>
this is my e-mail >>> [email removed]
...............................
Java Assignment 3
1.Use nested loops that print the following pattern:-
A) 1
12
123
1234
12345
123456
2.Write a program to compute the sum and product of all odd integers from 1 to 19.
3.write a program which writes the integers from 1 to 50, replacing every multiple of (5) by the word "OK" and every integer divisible by (11) by the word "FINE"
Ex.
1 2 3 4 OK 6 7 8 9 OK FINE 12 13 14 OK….....
4.Write a program that read a list of numbers from the user, storing them in one dimension array, then prints them in the opposites order.
Example
Input :- 5 8 7 1 12 10 78 14 5 32 15
Output:- 15 32 5 14 78 10 12 1 7 8 5
5.Write a program to find the positions and number of zeros in two dimension array of integer.
6.Write a program that reads a student’s test scores in the range of 50-100. It should then determine the number of students having scores in each of the following ranges: 50-59, 60-69, 70-79, 80-89, 90-100.
Note: use one dimension array to store the students score.
Last edited by Narue; Jul 20th, 2008 at 11:21 am. Reason: Snipped email
Please read:after that reformulate your question
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
for loop from 1 to 19
if statement is num%2 == 1
yes, add to sum
no, next number
problem solved
if statement is num%2 == 1
yes, add to sum
no, next number
problem solved
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Come on now, show some effort. Show us what you have tried in solving those problems, and provide information about what is going wrong with them and we will help you correct them, but we will not do them for you.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Jul 2008
Posts: 11
Reputation:
Solved Threads: 0
1.Use nested loops that print the following pattern:-
A) 1
12
123
1234
12345
123456
>>>>>>>>>>>>>>>>>>>>
the answer is :
A) 1
12
123
1234
12345
123456
>>>>>>>>>>>>>>>>>>>>
the answer is :
Java Syntax (Toggle Plain Text)
mport java.util.Scanner; public class program1 { // declaration of class public static void main ( String [] args ) { // declaration of main method for ( int i = 1 ; i <= 6 ; i++ ) { for ( int x = 1 ; x <= i ; x++ ) { System.out.print(x); //This statement to print X } System.out.println(); // This statement to print a new line } } // end of main method } // end of class
Last edited by Tekmaven; Jul 21st, 2008 at 3:28 pm. Reason: Code tags
•
•
Join Date: Jul 2008
Posts: 11
Reputation:
Solved Threads: 0
3.write a program which writes the integers from 1 to 50, replacing every multiple of (5) by the word "OK" and every integer divisible by (11) by the word "FINE"
Ex.
1 2 3 4 OK 6 7 8 9 OK FINE 12 13 14 OK….....
>>>>>>>>>>>>>>>>>>>>>
the answer is :
Ex.
1 2 3 4 OK 6 7 8 9 OK FINE 12 13 14 OK….....
>>>>>>>>>>>>>>>>>>>>>
the answer is :
Java Syntax (Toggle Plain Text)
import java.util.Scanner; public class program3 { // declaration of class public static void main ( String [] args ) { // declaration of main method int x ; for ( x = 1 ; x <= 50 ; x++ ) { if ( x % 5 == 0 ) System.out.print( " Ok " ); else if ( x % 11 == 0 ) System.out.print( " Fine " ); else System.out.print( " " + x + " " ); } } }
Last edited by Tekmaven; Jul 21st, 2008 at 3:31 pm. Reason: Code tags
No one's forgotten you, but it seems as though you have been wasting your time, and us wasting our time to make up for that isn't going to happen.
Show what you have for the other problems and we will help you to correct it, as already said, but we are not going to do it for you.
Show what you have for the other problems and we will help you to correct it, as already said, but we are not going to do it for you.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
Other Threads in the Java Forum
- Previous Thread: java homework help!!
- Next Thread: Please Help Compiling Error
| Thread Tools | Search this Thread |
Tag cloud for Java
affinetransform android api append apple applet application arguments array arrays automation bi binary bluetooth businessintelligence busy_handler(null) chat class classes client code component database draw eclipse encryption equation error event exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer intersect j2me java javaexcel javaprojects jmf jni jpanel julia linked linux list loop main map method methods mobile netbeans newbie number open-source oracle oriented panel print problem program programming project qt recursion reference replaysolutions repositories return robot scanner screen scrollbar se server set singleton size sms socket sort sql string swing test threads time tree utility windows xor






