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
CW 33 smartxide dot, thermage body, awt
![]() |
![]() Ping Tour W Black Nickel Gap Wedge 50 12 Orange Dot AWT STIFF Golf US $59.99
|
![]() Ping i15 Iron Set RH Black Dot AWT Stiff US $300.00
|
![]() PING I10 SINGLE BLACK DOT 7 IRON AWT NO CUSHIN] STEEL STIFF US $15.50
|
![]() Ping i15 7 Iron White Dot Steel AWT Regular flex 6747 US $1.99
|
![]() Ping i10 Green Dot 3 SW Irons Set AWT Stiff Steel 9 Piece Golf Club Set US $339.95
|
![]() Ping Rapture 5 Iron Black Dot w AWT Senior Flex Steel Shaft Ping Aqua Grip US $69.99
|
![]() Ping Rapture 7 Iron Black Dot w AWT Senior Flex Steel Shaft Ping Aqua Grip US $64.99
|
![]() Ping Rapture 9 Iron Black Dot w AWT Senior Flex Steel Shaft Ping Aqua Grip US $64.99
|
![]() Ping G15 Silver Dot 7 Iron 7I AWT Steel Stiff Firm NR US $19.99
|
![]() Ping G15 Green Dot 7 Iron 7I AWT Steel Regular Reg NR US $19.99
|
![]() PING G15 IRONS 4 PW UW YELLOW DOT RH AWT STEEL SR or SENIOR MINT US $549.00
|
![]() Ping i15 Iron set Golf Club 3456789WU stiff shafts AWT yellow dot US $360.00
|
![]() Ping G15 7 Iron Black Dot (Steel, Regular, AWT) g-15 7i Golf Club g 15 Sale Price: $49.99 Eligible for free shipping!Availability: Usually ships in 1-2 business days |
![]() Ping Rapture V2 Irons Set 6-PW (Black dot, Steel AWT, STIFF) Golf Sale Price: $399.99 Eligible for free shipping!Availability: Usually ships in 1-2 business days |
![]() Used Ping G10 Single Iron |
![]() Used Ping Tour-w Brushed Silver Wedge |
![]() Used Ping Tour-w Brushed Silver Wedge |
![]() Used Ping I10 Single Iron |
![]() Used Ping I Wedge Wedge |
![]() Used Ping G15 Â Â Â Single Iron |
![]() Used Ping I10 Single Iron |
![]() Used Ping Rapture V2 Single Iron |


US $59.99

![PING I10 SINGLE BLACK DOT 7 IRON AWT NO CUSHIN] STEEL STIFF](http://www.officialgolfclubs.com/images/e/230741334798_0.jpg)










Eligible for free shipping!







