Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 21st, 2008, 10:39 PM
ebhartse ebhartse is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 2 ebhartse User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 43 sec
Reputation Power: 0
Please Help, very amateur at programming Need Help on a 101 java program

Write a program to display the first 200 multiples of nine using a loop. The output should be displayed in rows of 10 values each. For example: row 1 should contain values for 9*1 through 9*10, row 2 should contain values for 9*11 through 9*20, etc. Format the output so that the numbers are aligned in a table.

Your output should look like this:


99 108 117 126 135 144 153 162 171 180
189 198 207 216 225 234 243 252 261 270
279 288 297 306 315 324 333 342 351 360
369 378 387 396 405 414 423 432 441 450
459 468 477 486 495 504 513 522 531 540
549 558 567 576 585 594 603 612 621 630
639 648 657 666 675 684 693 702 711 720
729 738 747 756 765 774 783 792 801 810
819 828 837 846 855 864 873 882 891 900
909 918 927 936 945 954 963 972 981 990
999 1008 1017 1026 1035 1044 1053 1062 1071 1080
1089 1098 1107 1116 1125 1134 1143 1152 1161 1170
1179 1188 1197 1206 1215 1224 1233 1242 1251 1260
1269 1278 1287 1296 1305 1314 1323 1332 1341 1350
1359 1368 1377 1386 1395 1404 1413 1422 1431 1440
1449 1458 1467 1476 1485 1494 1503 1512 1521 1530
1539 1548 1557 1566 1575 1584 1593 1602 1611 1620
1629 1638 1647 1656 1665 1674 1683 1692 1701 1710
1719 1728 1737 1746 1755 1764 1773 1782 1791 1800

Reply With Quote
  #2  
Old March 24th, 2008, 06:23 AM
Annie79 Annie79 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2007
Location: Beaverton OR
Posts: 17 Annie79 User rank is Just a Lowly Private (1 - 20 Reputation Level)  Folding Points: 49426 Folding Title: Beginner FolderFolding Points: 49426 Folding Title: Beginner FolderFolding Points: 49426 Folding Title: Beginner Folder
Time spent in forums: 7 h 25 m 11 sec
Reputation Power: 0
Post the code you have written so far.

Reply With Quote
  #3  
Old December 8th, 2014, 06:15 PM
Mostapha Amench Mostapha Amench is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2014
Posts: 1 Mostapha Amench User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 12 sec
Reputation Power: 0
[QUOTE=ebhartse]Write a program to display the first 200 multiples of nine using a loop. The output should be displayed in rows of 10 values each. For example: row 1 should contain values for 9*1 through 9*10, row 2 should contain values for 9*11 through 9*20, etc. Format the output so that the numbers are aligned in a table.


public class MultiplesOfNine{
public static void main(String[]args){
int i ;
for (i=1;i<201;i++)
{
System.out.print(9*i+" ");
if (i%10==0)
System.out.println();
}
System.out.println();
}
}

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > Please Help, very amateur at programming Need Help on a 101 java program


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap