Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <cs50.h>
- int main(void)
- {
- int x = 4;
- while (x < 1 || x > 8);
- int i;
- for (i = 0; i < x; x--){
- for (i=0; i<x; i++){
- printf("This is the inner loop i=%i ", i);
- }
- printf("This is the outer loop x=%i\n ", x);
- }
- printf("\nafter first loop x = %i\n", x);
- printf("\n\nNEXT LOOP\n\n\n");
- x=4;
- int l, k;
- for (k = 0; k < x; x--){
- for (l=0; l<x; l++){
- printf("This is the inner loop l=%i " ,l);
- }
- printf("This is the outer loop x=%i\n ", x);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement