For,while,do-while

can anyone hekp me how to prints numbers 10 through 99 in the following format:
10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29
and so on...plese bear with me i am a new user of this stuff..thaks alot

You can use the if block "if(i%10==9)" in this case.

Similar Messages

  • How to get the last error for while loop?

    How to get the last error for while loop? I just want transfer the last error for while loop, but the program use the shift register shift all error every cycle.

    What do you mean by "get" and "transfer"?
    If the shift register is not what you want, use a plan tunnel instead.
    Typically, programmers are interested in the first, not last, error.
    Can you show us your code so we have a better idea what you are trying to?
    LabVIEW Champion . Do more with less code and in less time .

  • I have a for loop inside of while loop.when i press stop for while loop, i also would like to stop for loop.how can i solve this problem?thanks

    i have a for loop inside of while loop.when i press stop for while loop, i also would like to stop for loop.how can i solve this problem?thanks

    Hi fais,
    Following through with what JB suggested. The steps involved in replacing the inner for loop with a while loop are outlined below.
    You can replace the inner for loop with a while by doing the following.
    1) Right-click of the for loop and select "Repalce" then navigate to the "while loop".
    2) Make sure the tunnels you where indexing on with the for loop are still indexing.
    3) Drop an "array size" node on your diagram. Wire the array that determines the number of iterations your for loop executes into this "array size".
    4) Wire the output of the array size into the new while loop.
    5) Set the condition terminal to "stop if true".
    6)Drop an "OR" gate inside the while loop and wire its output to the while loops condition terminal.
    7) C
    reate a local of the boolean "stop" button, and wire it into one of the inputs of your OR gate. This will allow you to stop the inner loop.
    8) Drop a "less than" node inside the inner while loop.
    9) Wire your iteration count into the bottom input of the "less than".
    10) Wire the count (see step 4 above) into the top input of the less than. This will stop the inner loop when ever the inner loop has processed the last element of your array.
    Provided I have not mixed up my tops and bottoms this should accomplish the replacement.
    I will let others explain how to takle this task using the "case solution".
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Is there an app for "while you were out" messaging?

    Is there an app for "while you were out" messages?

    Perhaps this link might help. I did a quick Google search for what you were asking for. Forgive me if you've seen this before. Click Here
    I'm not a creative person, so I've never personally tried this.

  • Wait for while between two functions execution

    Hi, Pro,
    I am now using jdk1.2 to develop GUI using Swing. I need help from you to figure out how do you make program waiting for while(like sleep) between function A and function B, and still not block the screen allow user to do other thing on the screen.
    like:
    private void Function(){
    functionA();
    //wait for 30 seconds here but
    functionB();
    Thank you very much!!
    ywang

    I did put it on, but I got message as:
    java.lang.InterruptedException: operation interrupted
    at java.lang.Thread.sleep(Native Method)Then you're probably trying to sleep the dispatcher thread. Sleep should never be called in event handler processing. A GUI event which triggers a process taking a substantial ammount of time, like this one, should always spawn a new thread to do it and, itself, return promptly.

  • HT4623 iOS6 runs for while aprox 1/2 hour then outputs an error MSG unable to update

    iOS6 runs for while aprox 1/2 hour then outputs an error MSG unable to update

    @ i3rend4nv05
    I’ve encountered a link that might help you to unzip the file. Check this out. 

  • I'm from Brazil and I'm living in USA for while, if I buy a t-mobile contract free iPhone 6, it will work when I back to my country?

    I'm from Brazil and I'm living in USA for while, if I buy a t-mobile contract free iPhone 6, it will work when I back to my country?

    Pedrosimonetti wrote:
    So, I have to wait Apple start to sell unlocked iphones?
    If you want an unlocked iPhone then you have to wait until unlocked iPhones are sold, yes.

  • Programar uma tabuada utilizando os ciclos FOR, WHILE e DO WHILE

    Pessoal,
    Ajudem-me, Tenho dificuldades em fazer uma tabuada com os ciclos FOR, WHILE, e DO WHILE, utilizando apenas um único índice ou uma única variável.
    Galera, é possível programar uma tabuada com estes pressupostos???
    Aguardo as vossas sugestões?
    Ps: Abaixo, a tentativa que fiz, mas não fui bem-sucedido.
    import javax.swing.JOptionPane;
    public class tab
    public static void main(String args[])
    int i;
    String Tabuada= "";
    int resultado=0;
    do
    for (i=0;i<=10;i++)
    resultado=i*1;
    Tabuada +="\n" + i + "x" + i + "=" + resultado;
    //JOptionPane.showMessageDialog(null, "Tabuada do " + i + Tabuada);
    // Tabuada="";
    // i=0;
    // i=i+1;
    // i=0;
    while(i<=10)
    i=i+1;
    // System.out.println("2 x "+i+"="+2*i);
    // i--;
    }while(i!=0);
    JOptionPane.showMessageDialog(null, "Tabuada do " + i + Tabuada);
    Tabuada="";
    }

    [read this|http://java.sun.com/docs/books/tutorial/java/nutsandbolts/while.html]

  • I have been with google for while now but I still can't access to google wallet, Would you please show me how? thanks

    I HAVE BEEN WITH GOOGLE FOR WHILE NOW BUT I STILL CAN'T ACCESS TO MY GOOGLE WALLET, BOTH ACCOUNTS, PERSONAL AS WELL AS BUSINESS. WOULD YOU PLEASE SHOW ME HOW? THANKS

    Seems like that would be a better question for a Google forum since it it Google's app. Here is a link about it from Google:
    https://www.google.com/wallet/
    If you need further help, I would suggest you post to a Google forum.
    GB

  • Programming a times table with FOR, WHILE & DO WHILE STATEMENTS

    Guys,
    Help me, I have tried hard, but I didn't find the answer, my problem is that I got difficulties in doing a times table with the FOR, WHILE, and DO WHILE STATEMENTS just using a single index or a single variable.
    Guys, is it possible to program a times table with these conditions all together in the same code???
    Do I await your suggestions?
    Ps: Below, the attempt that I did, but I was not successful.
    import javax.swing.JOptionPane;
    public class tab
    public static void main(String args[])
    int i;
    String TimesTable= "";
    int result=0;
    do
    for (i=0;i<=10;i++)
    result=i*1;
    TimesTable +="\n" + i + "x" + i + "=" + result;
    //JOptionPane.showMessageDialog(null, "Times tables of " + i + TimesTable);
    // TimeTable="";
    // i=0;
    // i=i+1;
    // i=0;
    while(i<=10)
    i=i+1;
    // System.out.println("2 x "+i+"="+2*i);
    // i--;
    }while(i!=0);
    JOptionPane.showMessageDialog(null, "Times Table of " + i + TimesTable);
    TimesTable="";
    }

    You can use the if block "if(i%10==9)" in this case.

  • After updating my firefox it crashes , it works for while but then when i try to open a new page it goes blank and i end up restarting my computer and everything works a little while but then the same thing happens , i don't kno how to fix it i need help.

    For instance I'll be on youtube.com watching videos but after a while. When i click on a different video it stops working, kind of like when I'm not connected anymore, but I'm still connected.
    After i restart or shut down then turn back on things work again for awhile. It doesn't seem like it's a specific website because it doesn't matter and after I restart the website works just fine for a while till it happens again.

    Please see the following articles [[Firefox Hangs]] and [[Firefox Crashes]]

  • Can't write cache file for while creating domain in soa 11.1.1.5 on HP-UX

    Hi,
    Installing SOA 11.1.1.5 on HP-UX and during domain creation/configuration I am getting the below errors
    **sys-package-mgr: can't write cache file for**
    and have lots of cache file errors for different packages
    Any idea what might be wrong and whats the cause of these errors and is it safe to ignore these errors if not what is the work arround. As I already looked at the below post but I don't find */var/tmp/wlstTemp* on my machine as suggested in the post below.
    SOA 11.1.1.5 install got can't write cache file
    So wondering if there's anything else I can do i.e. while creating or configuring a Domain pass some parameter to config.sh etc.
    Thanks

    Hi,
    I don't see python.cachedir in config.sh. Here is config.sh
    #!/bin/sh
    mypwd="`pwd`"
    # Determine the location of this script...
    # Note: this will not work if the script is sourced (. ./config.sh)
    SCRIPTNAME=$0
    case ${SCRIPTNAME} in
    /*)  SCRIPTPATH=`dirname "${SCRIPTNAME}"` ;;
      *)  SCRIPTPATH=`dirname "${mypwd}/${SCRIPTNAME}"` ;;
    esac
    # Set the ORACLE_HOME relative to this script...
    ORACLE_HOME=`cd "${SCRIPTPATH}/../.." ; pwd`
    export ORACLE_HOME
    # Set the MW_HOME relative to the ORACLE_HOME...
    MW_HOME=`cd "${ORACLE_HOME}/.." ; pwd`
    export MW_HOME
    # Set the home directories...
    . "${SCRIPTPATH}/setHomeDirs.sh"
    # Set the config jvm args...
    CONFIG_JVM_ARGS="${CONFIG_JVM_ARGS} -DCOMMON_COMPONENTS_HOME='${COMMON_COMPONENTS_HOME}'"
    export CONFIG_JVM_ARGS
    # Delegate to the main script...
    "${WL_HOME}/common/bin/config.sh" "$@"Thanks

  • No Active Nametab exist for - while deleting master data

    Hi,
    We are deleting a master data record in production and while saving the master data we are getting an error like "No Active Nametab exist for". And while going back the screen it is giving an error as "Table /BIC/YZEMPLOYEE does not exist". How do we resolve this and is there any program to delete the master datAny help is greatly appreciated.
    Regards
    Vijay

    Hi,
    Check this  OSS Note 211492.
    Hope this will resolve the issue..
    Best Regards,
    VVenkat..

  • What are the different among "for", "while" and "do-while"?????

    I am no clear when i ues one of them.
    I mean in what condition I can use each of them?
    what is each one's advantage?
    Thank you everyone replying and leave any idea. @_@
    <>

    is the same as:No it isn't (in example have used 3 instead of 25 so output is shorter:
    public class Test {
        public static void main(String[] args) {
            for (int x = 0; x < 3; x++) {
                System.out.println(x);
            System.out.println("****");
                int x = 0;
                while (x++ < 3) {
                    System.out.println(x);
            System.out.println("****");
                int x = 0;
                do {
                    System.out.println(x);
                } while (++x < 3);
    Replace your suggested while loop with:
    int x = 0;
    while (x < 25) {
      //do something
      x++;
    }To the OP: All this should be covered in just about any introductory Java book or tutorial. Have you read any? If so, what in particular are you having trouble with understanding? If not, then go and do so.

  • How to avoid Build Array function inside a For (while) Loop?

    Hi there,
    I have a simple question about how to avoid using Build Array function inside the loop. Now I want to remove the Build Array funtion inside the loop to improve the performance (To get better memory management). Any idea how to do that?
    Thanks a lot!
    Warmest regards,
    Chong

    It's been my experience that using the auto-indexing to build an array
    on a For loop is just as good as initializing and replacing elements.
    The For loop knows before it runs how many iterations it has to run and
    can allocate the array ahead of time.
    You're better off initializing and replacing when using a While loop
    because it does not know how many iterations it will run and can't
    pre-allocate the array ahead of time.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • Found 0 results for While browsing eBay, when I watch or bid on an item, and later view it again, many inches of white space appears before item appears. If I delete the clear recent history box, the pages will come up as they should for several times, th

    While browsing eBay, when I watch or bid on an item, and later view it again, many inches of white space appears before item appears. If I delete the clear recent history box, the pages will come up as they should for several times, then go back to a lot of extra white space. How can I prevent this? Thank you, Rick in English
    == This happened ==
    Every time Firefox opened
    == About a month ago

    As stated in 1.:
    1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem.
    Obviously, it will not harm your computer provided you follow the instructions. However, if you don't post your results in the thread where you were given those instructions, then the person helping you cannot help you further. As he asks at the end, "please post the test results on Pastebin, then post a link here to the page you created."

Maybe you are looking for