User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 423,109 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,342 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 902 | Replies: 30
Reply
Join Date: Jul 2008
Posts: 11
Reputation: zoooz_20 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zoooz_20 zoooz_20 is offline Offline
Newbie Poster

help please

  #1  
Jul 20th, 2008
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.
Last edited by Narue : Jul 20th, 2008 at 10:21 am. Reason: Snipped email
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,430
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 11
Solved Threads: 295
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: help please

  #2  
Jul 20th, 2008
Please read:
  1. the forum rules
  2. sticky on homeworks
after that reformulate your question
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Jul 2008
Posts: 11
Reputation: zoooz_20 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zoooz_20 zoooz_20 is offline Offline
Newbie Poster

Re: help please

  #3  
Jul 20th, 2008
i hava solve the 1st one and the 3rd one but the athor i dont
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,430
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 11
Solved Threads: 295
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: help please

  #4  
Jul 20th, 2008
for loop from 1 to 19
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)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Feb 2006
Posts: 1,453
Reputation: masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice 
Rep Power: 9
Solved Threads: 129
masijade's Avatar
masijade masijade is online now Online
Nearly a Posting Virtuoso

Re: help please

  #5  
Jul 20th, 2008
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
Reply With Quote  
Join Date: Jul 2008
Posts: 11
Reputation: zoooz_20 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zoooz_20 zoooz_20 is offline Offline
Newbie Poster

Re: help please

  #6  
Jul 21st, 2008
1.Use nested loops that print the following pattern:-

A) 1
12
123
1234
12345
123456
>>>>>>>>>>>>>>>>>>>>
the answer is :
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 2:28 pm. Reason: Code tags
Reply With Quote  
Join Date: Jul 2008
Posts: 11
Reputation: zoooz_20 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zoooz_20 zoooz_20 is offline Offline
Newbie Poster

Re: help please

  #7  
Jul 21st, 2008
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 :

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 2:31 pm. Reason: Code tags
Reply With Quote  
Join Date: Jul 2008
Posts: 11
Reputation: zoooz_20 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zoooz_20 zoooz_20 is offline Offline
Newbie Poster

Re: help please

  #8  
Jul 21st, 2008
please i need ur help >>> becuse i have to submit the assignment tomorow ... there is no time >> becuse i need to understand them ... please >>> dont forget me
Reply With Quote  
Join Date: Feb 2006
Posts: 1,453
Reputation: masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice masijade is just really nice 
Rep Power: 9
Solved Threads: 129
masijade's Avatar
masijade masijade is online now Online
Nearly a Posting Virtuoso

Re: help please

  #9  
Jul 21st, 2008
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.
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
Reply With Quote  
Join Date: Jul 2008
Posts: 11
Reputation: zoooz_20 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
zoooz_20 zoooz_20 is offline Offline
Newbie Poster

Re: help please

  #10  
Jul 21st, 2008
why u r not helpfull with me >>
there is an idea in this programs but i dont know what is it ...
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Java Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the Java Forum

All times are GMT -4. The time now is 6:15 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC