Dot Awt
Dot Awt

Write a program that asks the user to enter two words....?
Write a program that asks the user to enter two words. The program then prints out both words on one line. The words will be separated by enough dots so that the total line length is 30
i hav done this but not able to get it right
// The "EnterWord" class.
import java.awt.*;
import hsa.Console;
public class EnterWord
{
static Console c; // The output console
public static void main (String[] args)
{
c = new Console ();
//
String enterFirstWord,enterSecondWord;
c.print("Enter first word:");
enterFirstWord=c.readLine();
c.println();
c.print("Enter second word:");
enterSecondWord=c.readLine();
c.println();
c.print(enterFirstWord+"."+enterSecondWord);
} // main method
} // EnterWord class
please help me i am in urgent need
You could use a loop to output the dots.
// The "EnterWord" class.
import java.awt.*;
import hsa.Console;
public class EnterWord
{
static Console c; // The output console
public static void main (String[] args)
{
c = new Console ();
int dots=30;
//
String enterFirstWord,enterSecondWord;
c.print("Enter first word:");
enterFirstWord=c.readLine();
c.println();
c.print("Enter second word:");
enterSecondWord=c.readLine();
dots -= (length(enterFirstWord)
+ length(enterSecondWord));
c.println();
c.print(enterFirstWord);
while (dots > 0 )
{
c.print(".'");
dots--;
}
c.print(enterSecondWord);
} // main method
} // EnterWord class
![]() |
![]() PING G15 IRONS BLACK DOT 3 PW AWT REG STEEL US $711.30
|
![]() PING EYE 2 BERYLLIUM COPPER BLACK DOT IRONS 3 PW AWT REGULAR FULLY RESTORED US $591.84
|
![]() Ping G15 5 PWUW54 Wedge Blue Dot AWT Regular Flex Steel Shafts RH Irons Set US $559.99
|
![]() PING S56 5 PWGW Green Dot AWT Stiff Flex Steel Shafts Irons Iron Set US $559.99
|
![]() Ping G15 Iron Set G 15 4 UW AWT Senior Soft Regular Flex Steel Black Dot US $578.00
|
![]() Ping i15 3 PW Green Dot AWT Stiff Flex Steel Shafts Iron Set Golf Clubs US $499.99
|
![]() Ping G15 Iron Set G 15 5 LW AWT w Cushin Stiff Flex Steel Black Dot US $527.00
|
![]() Ping i15 Iron Set i 15 4 UW AWT Regular Flex Steel Orange Dot US $527.00
|
![]() Ping G15 Iron Set G 15 4 UW AWT Stiff Flex Steel Yellow Dot US $527.00
|
![]() Ping K15 Iron Set 5 PW Golf Clubs Stock Ping AWT Steel Stiff Blue Dot US $440.00
|
![]() Ping i15 4 PW White Dot AWT Stiff Flex Steel Shafts RH i 15 Irons Iron Set US $439.99
|
![]() Ping G10 Iron Set G 10 4 UW AWT Stiff Flex Steel Maroon Dot 05 Long US $468.00
|
![]() PING Irons G15 K15 Combo Iron Set Blue Black Dot AWT Steel Stiff TALL 1 US $469.99
|
![]() Ping G10 Iron Set G 10 4 UW AWT Stiff Flex Steel Black Dot 05 Short US $457.00
|
![]() Ping G10 Iron Set G 10 5 SW AWT Stiff Flex Steel Red Dot US $457.00
|
![]() Ping G10 Iron Set G 10 4 SW AWT Stiff Flex Steel White Dot 1 Long US $409.00
|
![]() PING G15 BLACK DOT IRONS 4 PW GW SW 9PC AWT NO CUSHIN] STEEL REGULAR US $401.00
|
![]() PING G 10 4 PWSW White Dot AWT Regular Flex Steel Shafts RH Irons Iron Set US $399.99
|
![]() PING G 10 4 PW Maroon Dot AWT Regular Flex Steel Shafts Left Hand Irons Iron Set US $399.99
|
![]() PING Irons i15 Iron Set Black Dot AWT Steel Regular Flex 5 UWCLEAN US $399.99
|
![]() Ping i15 Black Dot 5 UW Irons AWT Stiff Steel Golf Club Set US $399.95
|
![]() Ping i15 Blue Dot 5 UW Irons AWT SR Senior Steel Golf Club Set US $399.95
|
![]() PING Irons i15 Iron Set Blue Dot AWT Steel Stiff Flex 4 PCLEAN US $389.99
|
![]() Ping G15 Irons4 PWAWT REGULAR FLEXBLACK DOT US $389.99
|
![]() Ping i10 4 PWUW Irons Green Dot AWT Regular Flex Steel Iron Set Golf Clubs US $379.99
|
![]() PING G10 G 10 IRONS 4 PW AWT CUSHIN REGULAR STEEL SILVER DOT USED US $379.99
|


US $711.30















![PING G15 BLACK DOT IRONS 4 PW GW SW 9PC AWT NO CUSHIN] STEEL REGULAR](http://www.golf4charity.org/images/e/270980448466_0.jpg)








