Anyone can help me about this?

Write an application that prompts the user to enter the size of the side of a square, then displays a hollow square of that size made of asterisks. Your program should work for squares of all side lengths between 1 and 20.

Write an application that prompts the user to enter
the size of the side of a square, then
displays a hollow square of that size made of
asterisks. Your program should work for squares of
all side lengths between 1 and 20.Done!
<html>
<head>
<script type="text/javascript">
function mySquare(){
  var squareSize;
  while(isNaN(parseInt(squareSize))){
    squareSize = prompt("Please enter the size of the square you would like.","0");   
  var sStr;
  sStr = "*";
  for(i=0;i<squareSize;i++){
    sStr +="*";
  sStr +="*\n";
  for(i=0;i<squareSize;i++){
    sStr +="*";
    for(j=0;j<squareSize;j++){
         sStr +=" ";
    sStr +="*\n";
  sStr +="*"; 
  for(i=0;i<squareSize;i++){
    sStr +="*";
  sStr +="*";
  alert(sStr);
</script>
</head>
<body>
<form>
<input type="button" onclick="mySquare()" value="Click Me">
</form>
</body>
</html>Please feed me dukes

Similar Messages

  • HT201210 hi everyone, i have a problem about my iphone 4S, doesn't work with wifi connection and bluetooth since upgrade to the IOS 7.0.3. Can anyone can help me tosolve this problem?????Thank's regards paulus

    hi everyone, i have a problem about my iphone 4S, doesn't work with wifi connection and bluetooth since upgrade to the IOS 7.0.3. Can anyone can help me tosolve this problem?????Thank's regards paulus

    Try the suggestions here to see if they resolve your problem:
    http://support.apple.com/kb/ts1559
    If these don't work you may have a hardware problem. Visit an Apple store for an evaluation or contact Apple Support.

  • I can not save any data to external hard drive from my mac pro. Is there anyone can help me in this regard?( note, when i first plug my ext. drive to mac i chose option to backup later)

    I can not save any data to external hard drive from my mac pro. Is there anyone can help me in this regard?( note, when i first plug my ext. drive to mac i chose option to backup later)

    The device may be formatted for Windows, as NTFS. The format is readable, but not natively writable on a Mac. To write to the device, you must either reformat it (erasing all the contents) or install third-party software to enable write access to NTFS.

  • I just buy a imac 27inch when after intalling everthing for windows 7 and all the drivers i need and goes to the restard part my imac just goes to a black screen with a blinking cursel and it just wont proceed anyone can help me with this?

    i just buy a imac 27inch when after intalling everthing for windows 7 and all the drivers i need and goes to the restard part my imac just goes to a black screen with a blinking cursel and it just wont proceed anyone can help me with this?

    Support articles for things like this would be here:
    http://www.apple.com/support/bootcamp

  • Hi,after upgrade to OS x mavericks i can't open my windows at BOOTCAMP, anyone can help me with this situation?

    HI after i upgrade to new Os x Mavericks i found that i cant open my WINDOWS in my BOOTCAMP, its always appear asking me to windows running or not well shut down properly message, after i try to go to RUNNING WINDOWS NORMALLY it stil cant open and auto open and running on MAC. anyone please help me. Thank you

    Ok this worked to solve the error.
    Use cmd prompt in windows 7 or 8 and run as admin:
    sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
    sc config mrxsmb20 start= disabled
    No need for all that power shell nonsense as shown elsewhere for windows 8.
    That's it. Also force smb2 disabling on the apple side for good measure.
    With the above I was able to network mavericks and windows 8.1 pro flawlessly. He issues I had before where I could not read video, ISO and audio files (but could open documents and pictures from the windows machine connected to an apple network share folder went away.

  • Anyone can help me get this working please

    Error 1
    'No' is not a member of 'DJ_APP.Module1.TrackType'.
    D:\Year 2 HNC 10 feb\HNCD Unit 20 - Event Driven Programming Solutions (NeathAfan)\DJAPP\DJ APP\DJ APP\Form3.vb
    32 9
    DJ APP
    Error 2
    'No' is not a member of 'DJ_APP.Module1.TrackType'.
    D:\Year 2 HNC 10 feb\HNCD Unit 20 - Event Driven Programming Solutions (NeathAfan)\DJAPP\DJ APP\DJ APP\Form3.vb
    34 27
    DJ APP
    Error 3
    'no' is not a member of 'DJ_APP.Module1.TrackType'.
    D:\Year 2 HNC 10 feb\HNCD Unit 20 - Event Driven Programming Solutions (NeathAfan)\DJAPP\DJ APP\DJ APP\Form3.vb
    79 9
    DJ APP
    Error 4
    'no' is not a member of 'DJ_APP.Module1.TrackType'.
    D:\Year 2 HNC 10 feb\HNCD Unit 20 - Event Driven Programming Solutions (NeathAfan)\DJAPP\DJ APP\DJ APP\Form3.vb
    81 27
    DJ APP
    Error 5
    Expression expected. D:\Year 2 HNC 10 feb\HNCD Unit 20 - Event Driven Programming Solutions (NeathAfan)\DJAPP\DJ APP\DJ APP\Form3.vb
    93 105
    DJ APP
    Error 6
    Identifier expected. D:\Year 2 HNC 10 feb\HNCD Unit 20 - Event Driven Programming Solutions (NeathAfan)\DJAPP\DJ APP\DJ APP\Form3.vb
    103 59
    DJ APP
    Public Class Form3
        Dim numofrecords As Integer
        Dim Filename As String
        Dim Tableformat As String = "(0,-8)(1,-20)(2,-20)(3,-10)(4,-20)"
        Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            FileOpen(1, "Tracks.dat", OpenMode.Random, , , Len(Tracks))
            numofrecords = LOF(1) / Len(Tracks)
            FileClose(1)
        End Sub
        Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
            ' Get the song info from the form
            Tracks.TrackID = txtTrackID.Text
            Tracks.Title = txttitle.Text
            Tracks.Artist = txtartist.Text
            Tracks.Genre = txtGenre.Text
            Tracks.Duration = txtduration.Text
            Tracks.era = txtera.Text
            ' write the record to file
            FileOpen(1, "Tracks.dat", OpenMode.Random, , , Len(Tracks))
            FilePut(1, Tracks, numofrecords + 1)
            'Close file
            FileClose(1)
            ' add one to the number of records
            numofrecords = numofrecords + 1
            Tracks.No = numofrecords
            txtTrackID.Text = Tracks.No
            ' place cursor in id box
            txtTrackID.Focus()
            'clear form
            txtartist.Text = ""
            txtduration.Text = ""
            txtera.Text = ""
            txtGenre.Text = ""
            txttitle.Text = ""
            txtTrackID.Text = ""
        End Sub
        Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
            txtartist.Text = ""
            txtduration.Text = ""
            txtera.Text = ""
            txtGenre.Text = ""
            txttitle.Text = ""
            txtTrackID.Text = ""
        End Sub
        Private Sub lstsongs_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstsongs.SelectedIndexChanged
        End Sub
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
            Me.Close()
        End Sub
        Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
            'set the filename
            Filename = "Tracks.dat"
            'open the file
            FileOpen(1, FileName, OpenMode.Random, , , Len(Tracks))
            'check numnber of records in file
            numofrecords = LOF(1) / Len(Tracks)
            'close file
            FileClose(1)
            Tracks.no = numofrecords + 1
            txtTrackID.Text = Tracks.no
        End Sub
        Private Sub btnList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnList.Click
            'clear list box
            lstsongs.Items.Clear()
            'headings
            lstsongs.Items.Add(String.Format(TableFormat, "Track ID", "Title", "Artist", "Genre", "Duration",
            'open file
            FileOpen(1, Filename, OpenMode.Random, , , Len(Tracks))
            ' Add records to list box 
            Do While Not EOF(1)
                FileGet(1, Tracks)
                lstsongs.Items.Add(String.Format(Tableformat, _ Tracks.TrackID = txtTrackID.Text,
                Tracks.Title, Tracks.Artist, Tracks.Genre, _
                Tracks.Duration, Tracks.era))
            Loop
            'close file
            FileClose(1)
        End Sub
    End Class

    It's not all there and as said before try using the Inset Code Block button in the toolstrip at the top of a post you are editing for inserting your code in so it displays correctly. If you hover your mouse over each tool in the toolbar at the top of a post
    you are editing a tooltip will display providing what each tool is for. Like
    B is for Bold.
    You don't display any code for DJ_APP.Module1 or provide what you are attempting to do with the code you have and nobody has a .Dat file that you may be using for testing with.
    And it seems like you may be using relatively old style coding techniques when databases like
    Microsoft SQL Server Compact 4.0 are free and downloadable from Microsoft and others unless you enjoy using .Dat files for some reason.
    Plus you could use DataGridView for displaying things like ("TableFormat, "Track ID", "Title", "Artist", "Genre", "Duration", 'open file") whatever all that is with the DGV using a DataTable since
    different fields in a DataTable can be different types. AFAIK you could even store all the audio tracks in a database.
    I would recommend you take a step back to design your GUI regarding what controls it will use for what it needs to do as well as what capabilities can be used with those controls and learn about that for a while before writing any code.
    I would've researched DJ apps to see what visual styles they have and how they work before designing a GUI and writing any code.
    Google search results for "Radio station music scheduling software"
    La vida loca

  • Anyone can help me about the driver of USB adaptor CB2

    Dears,
    I have lost the driver of 'creative' USB adaptor, in which made my USB not work, can anyone give me the link to download the driver?, please.
    beautykey

    @OP: there is no content in your message, it's just begging. The title
    of your topic contains two more or less informative words "PARSING codes".
    My question to you is: what exactly do you mean by "PARSING" and
    "codes"? Parsing context free (programming) languages? I guess
    you're not talking natural languages here because your project should
    just take a week to complete. Care to elaborate?
    kind regards,
    Jos
    ps. and why "PARSING" instead of "parsing"?

  • "Your iPhone could not be activated because the activation server is temporarily unavailable." i tried it many times in DFU mode buy it not working .. i tried micro sim cards but it definitely not word :( please anyone can help me fix this problem

    "Your iPhone could not be activated because the activation server is temporarily unavailable." help me please ..

    I have same message. Just tried the update yesterday. Phone NOT jail broke and my SIM card has been init since I bought it. I need my phone and information ASAP. Is backed up on comp but can't get to without phone! During update my laptop shut off. Problem started after I started it back up to finish the process. Why would that make a diff? What to do now???? Help!

  • In my computer some of the iTunes files got deleted accidently and I couldn't reinstall it . Evrytime I try torun setup file  I am getting this error message "C:\Users\Rif\AppData\Local\Apple\Apple Software Update\" ,appreciate if anyone can help me on th

    In my computer some of the iTunes files got deleted accidently and I couldn't reinstall it . Evrytime I try torun setup file  I am getting this error message"C:\Users\Rif\AppData\Local\Apple\Apple Software Update\" ,appreciate if anyone can help me on this pls?

    Even after deleting all files and folders from hard drive i am still getting this error!!

  • HT201364 i Cant update my mac OS X V10.5.8 into a higher version., Anyone can help?

    Anyone can help me to this problem?.,Thanks .

    Also, unless you have a Core2duo (CoreDuo and CoreSolo are not Core2Duo), i3, i5, or i7 processor, you can't upgrade past 10.6.8. 
    See this user tip to see if your software is ready for 10.7 or higher:
    https://discussions.apple.com/docs/DOC-6271

  • Cant find printer driver for CANON E510. Anyone can help me?

    Good day everyone.
    i am new user for Mac's family. I have google and find driver for printer CANON E510 and wish to install in my Mac. Unfortunately I unable to find it. I have try a the link based on search. However it does not fit to OS 10.9.5.
    Anyone can help me into this issue?
    Thanks beforehand all!!

    Try Canon Printer Drivers v3.2 for OS X

  • Urgent..please anyone can help me??????

    <b>Hi all..
    please anyone can help me.for this issue....
    My Requirements is first need to MR11 tarnsaction and create zmr11 transaction and also the copy the corresponding MR11 program create Z program, which i did it.
    but now i have create a POPUP window, which contain 
    Account:           Cost Centre:
                       Internal Order:
                      Profit Centre:
    We need to copy the program for MR11 and inside it, refer to a copy of MR_ACCOUNT_ASSIGNMENT, which would contain the logic for replacing the account number picked up from configuration with that entered by the user.
    The code that needs to be added here would generate a popup, accept the account number from the user, and replace the value of KONTO with this number, which is the export parameter for the Function Module.
    At some point before the call to this FM we would need to write code to generate a pop-up, which would be populated by the user with G/L account at run-time.
    i need to modiy this internal table::::
    Call function' CKMLGRIR_BUILD_GRIR_MAINTAIN'
       tables
          lt_grirpos = t_grirpos_package
    The internal table t_grirpos_package would need to be modified at this point and populated with the values populated by the user in the pop-up screen.</b>

    <logic:iterate id="dtoi" name="ages"
    collection="ages.keySet()" indexId="dtoi">
    <% interfaz.GenericDto dtoEA =
    (interfaz.GenericDto)dtoi; %>
    <% if (dtoEA != null){ %>
    <% }; %>
    </logic:iterate> Try the following (assuming "ages" is the HashMap - adjust as necessary):
    <logic:iterate id="dtoi" name="ages">
    <tr>
    <td><bean:write name="dtoi" property="value.edad"/></td>
    <td><bean:write name="dtoi" property="value.ctotal"/></td>
    </tr>
    </logic:iterate>

  • I tried to download a book I bought but failed. The error message contains "The operation couldn't be completed. (Product Integrity error 9918). Anyone can help?

    I tried to download a book I bought but failed. The error message contains "The operation couldn't be completed. (Product Integrity error 9918)". Anyone can help?

    If this is something you attempted to purchase and download through the iTunes store, then contact iTunes support. http://www.apple.com/emea/support/itunes/contact.html

  • I have been having this problem since the fourth of this month. I tried to open iTunes and this error came up: "iTunes was not installed correctly. Please reinstall iTunes error 7 windows error 126". If anyone can help I would greatly appreciate it.

    I have been having this problem since the 4th of this month. I tried to open iTunes and this error message came up: "iTunes was not installed correctly. Please reinstall iTunes error 7 windows error 126". There is nothing else that comes up but if anyone can help or know anything about it I will greatly appreciate it.

    Have you tried google for this Error Message...
    http://support.microsoft.com/kb/959077

  • Hi i have an itouch 4th gen the problem is that the front cover has started to come away, looks like the glue is drying up, ive got older ones and they are still working fine. Has anyone else had this problem and if so what can be done about this. Thanks

    Hi wondering if anyone can help me, i have an itouch 4 gen and the front cover has started to come away, it hasn't been dropped or anything just started to come away ( although i did notice that it was heating up drastically ) looks to me like the glue has dyed up and as usual the guarantee had not long ran out. Has anyone else has this problem if so what can be done about it. Thanks

    SOme users have reported that their screen has come a little loose but very few.
    Try fixing it yourself
    iPod Touch Repair – iFixit

Maybe you are looking for