Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old May 2nd, 2008, 2:27 AM   #1
LAYAN-2008
Newbie
 
Join Date: Apr 2008
Posts: 3
Rep Power: 0 LAYAN-2008 is on a distinguished road
count multiples of 6 between two numbers given by the user.

Hi all, Is my answer true .. and I want your opinion in my answer
• Write a program fragment to count multiples of 6 between two numbers given by the user.

java Syntax (Toggle Plain Text)
  1. int X=30;
  2. int Y = 60;
  3. int count=0;
  4. do {
  5. X++;
  6. if(X%6==0)
  7. {
  8. count++;
  9. }
  10. } while(X<Y);
  11. System.out.println("Count of Multiplies=" + count );

Thank you..

Last edited by big_k105; May 2nd, 2008 at 10:05 AM. Reason: Added Code Tags
LAYAN-2008 is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
code to add numbers in an array truBlu1 Java 9 Oct 12th, 2007 10:08 PM
Post count adjustments big_k105 Community Announcements and Feedback 26 Nov 28th, 2005 5:02 PM
User Input for Number Format ericelysia1 Java 0 Jul 21st, 2005 3:41 PM
Loading and Destroying web user controls into a panel see07 C# 0 Feb 2nd, 2005 12:38 PM
Show web user control hidden see07 C# 1 Feb 2nd, 2005 10:35 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:17 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC