Ask Experts Questions for FREE Help !
Ask
    andyhaus1057's Avatar
    andyhaus1057 Posts: 98, Reputation: 1
    Junior Member
     
    #1

    Aug 6, 2009, 03:10 PM
    Nested loop
    How would I design a nested loop that displays 10 rows of # characters that should be 15 # characters in each row?
    slapshot_oi's Avatar
    slapshot_oi Posts: 1,537, Reputation: 589
    Ultra Member
     
    #2

    Aug 7, 2009, 03:44 AM
    Quote Originally Posted by andyhaus1057 View Post
    How would I design a nested loop that displays 10 rows of # characters that should be 15 # characters in each row?
    [code="C"]
    #include <stdio.h>

    int main(int argc, char *argv[]) {
    int i;
    int j;

    for(i = 0; i != 10; i ++){
    printf("\n");

    for(j = 0; j !=15; j ++)
    printf("%c", '#');
    }
    }
    [/code]

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

BindingContext Loop [ 1 Answers ]

I am new to this forum, but need assistance. I will preface this as my homework. I do not expect specific answers, but a point in the right direction is much appreciated. Assume that a form's BindingContext contains a DataSet named dsSample with a table named tblResponses. Write a loop to...

How could I put 2 conditions with COUNT IF Function and NESTED IF in Excel model [ 6 Answers ]

Hi, I am a new member, I hope you could help me to complete my assignment tonight, I am stock with "Count IF" function in Microsoft Excel 2003 How could I write the function with this commands: Count if the Tax which is (E15) not equal to 0, then I want to use a nested if with these...

Restat loop [ 7 Answers ]

Every time I turn my computer on it will go into a restart loop: on,off,on,off etc. Like a continuous restart mechanism. On normal bootup I reach the desktop to be met with error messages telling me my System has recovered from a serious error. I click "DOnt send" and another pops up. After...


View more questions Search