Saturday, July 25, 2009

Can you give some example of turbo C using for loops?

how to display in turbo c if it will start in 10 downward to 1 and also from Z to A through the use of for loops?

Can you give some example of turbo C using for loops?
// Is this your homework???





// print the numbers decending from 10 down to 1 inclusive


for (int i = 10; i %26gt;= 1; i--) {


printf("%d ", i);


}





// print the characters descending from Z down to A inclusive


for (char c = 'Z'; c %26gt;= 'A'; c--) {


printf("%c ", c);


}



makeup tips

No comments:

Post a Comment