Question

Write a loop to print a list of numbers starting at 64 and ending at 339....

Write a loop to print a list of numbers starting at 64 and ending at 339. Justify your syntax.

Homework Answers

Answer #1

ANSWER:

Loop to print a list of numbers starting at 64 and ending at 339.

for(i=64;i<=339;i++)
   {
       cout<<i;
   }

We use for loop to print the list.

Syntax:

for(initialization;condition checking;increment/decrement);

{

//Statements

}

1. In initialization section we intialize i variable to 64.

2.Second step is condition checking and we check that the i is less than equal to 339.If condition true then the statement inside the body block executed else the loop gets terminated.

3.Third step is increment and we increment i with 1 until the condition is false.

Program to print a list of numbers starting at 64 and ending at 339.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
.Write a for loop to create a list of all the odd numbers between 15 and...
.Write a for loop to create a list of all the odd numbers between 15 and up to and not including 75. Write a second for loop to find the average value in the list, then print it.
Uses a while loop to print the numbers from 3 - 19. Uses a do-while loop...
Uses a while loop to print the numbers from 3 - 19. Uses a do-while loop to print the numbers from 42 - 56. Uses a for loop to print the numbers from 87 - 95. Asks the user for 2 numbers. Uses a loop to print all numbers between the given numbers, inclusive. Note: Consider that your user's second number can be lower! (see example below) Note: Also consider that your user might give you two of the same...
Please, write a loop to print even numbers of an array a with pointers. You can...
Please, write a loop to print even numbers of an array a with pointers. You can use a variable “size” for array size
Prime Numbers) Write a program to calculate and print a list of all prime numbers from...
Prime Numbers) Write a program to calculate and print a list of all prime numbers from 1 to 100. C programming
Write an R code to print out all even numbers from the following numbers list in...
Write an R code to print out all even numbers from the following numbers list in the same order they are received. Write the code so it does not print any numbers that come after 83. numbers = [951, 40, 84, 51, 60, 69, 48, 19, 61, 85, 98, 50, 72, 47, 44, 61, 83, 65, 41, 51, 63, 61, 65, 75, 21, 30, 84, 92, 23]
Using a for loop and range command, print the sequence of numbers from 1 to 20...
Using a for loop and range command, print the sequence of numbers from 1 to 20 (skipping two numbers for each element); that is, your code should print out the numbers 1,4, 7, 10, … (max should not exceed 20). Use x as the variable name
Using an WHILE loop in PL/SQL print numbers 100 down to 0
Using an WHILE loop in PL/SQL print numbers 100 down to 0
Write a largestBelowValue(numbers, value) function that returns the largest number in the list numbers that is...
Write a largestBelowValue(numbers, value) function that returns the largest number in the list numbers that is smaller than value. Assume the numbers are always positive integers. Some example test cases (include these test cases in your program): >>>print(largestBelowValue([31, 5, 71, 53, 40, 17], 40)) 31 >>>print(largestBelowValue([31, 5, 71, 53, 40, 17], 41)) 40 returns None since no value is smaller than 2 in the list >>>print(largestBelowValue([31, 5, 71, 53, 40, 17], 2)) None
write a loop to print an array a with pointers backwards. You can use a variable...
write a loop to print an array a with pointers backwards. You can use a variable “size” for array size. write you code in C
In Java programming language 11.Create the code for a for loop to print the numbers 1  through...
In Java programming language 11.Create the code for a for loop to print the numbers 1  through 5 inclusive vertically so the output is 1 2 3 4 5 11b What is the output of the following               OUTPUT int i=3; while(int i >0) { System.out.println(i); i--; } 11c What is the output of the following               OUTPUT for(int i=3;i<10;i++) System.out.println(3*i); 11d Create the line of code to print the numbers 10 through 1 decreasing by 1 each time 11e Create the line of code...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT