Question





Write a program that prints the following console output using the while-loop and for-loop D not use if-else, setw) and ciomanip> for this problem. .Before you open a Word file to copy the screen shots, tell Dr. Jo. Save the Word file as your name in your flash drive. .Take a screen-shot the code and paste to the Word file. (5 points). Take a screen-shots of the console output and paste to the Word file. (5 points) Save the Word file and give the flash drive to Dr. Jo our name and V number --while-loop---- value of a number: 11 value of a number: 12 value of a number: 13 value of a number: 14 value of a number: 15 Sum of the numbers from while-loop: 65 Value of a number: 11 Sum of the numbers: 11 her: 12
0 0
Add a comment Improve this question Transcribed image text
Answer #1

V while -loop ous name an vax: 1 while (vas< 16) Poy- lop

Add a comment
Know the answer?
Add Answer to:
Write a program that prints the following console output using the while-loop and for-loop D not...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Newmultiply.Java // NewMultiply.java - This program prints the numbers 0 through 10 along // with these...

    Newmultiply.Java // NewMultiply.java - This program prints the numbers 0 through 10 along // with these values multiplied by 2 and by 10. // Input: None. // Output: Prints the numbers 0 through 10 along with their values multiplied by 2 and by 10. public class NewMultiply {    public static void main(String args[])    {               String head1 = "Number: ";        String head2 = "Multiplied by 2: ";        String head3 = "Multiplied...

  • Write a Java program that: • Asks the user to enter the number of integers that...

    Write a Java program that: • Asks the user to enter the number of integers that he need to enter; • Asked him to enter integer by integer; • Print The number of Odd numbers entered and the number of Even numbers entered. Important notes: 1. You should have to copy and paste the Java as your answer for this question. DON’T take screen shot for your Java Code. It must be editable. 2. Take a screen shot for your...

  • This assignment tests your ability to write C programs that handle keyboard input, formatted console output,...

    This assignment tests your ability to write C programs that handle keyboard input, formatted console output, and input/output with text files. The program also requires that you use ctype functions to deal with the logic. In this program, you will input from the user two characters, which should both be letters where the second letter > the first letter. You will then input a file character-by-character and output those letters that fall between the two characters (inclusively) to an output...

  • What does the following nested loop structure output? count = 1; while (count <= 11) {innerCount...

    What does the following nested loop structure output? count = 1; while (count <= 11) {innerCount = 1 while (innerCount <= (12 - count)/2) {cout << " "; innerCount++;} innerCount = 1; while (innerCount = 1; while (innerCount <= count) {cout << "0"; innerCount++;} cout << endl; count++;} What does the following nested loop structure output? count = 1; while (count <= 10) {innerCount = 1; while (innerCount <= 10) {cout << setw(5) << count * innerCount; innerCount++;} cout <<...

  • java in simple way pla help me 1. Write a program that uses a while loop...

    java in simple way pla help me 1. Write a program that uses a while loop to read 10 integer numbers from file "numbers.in" and prints their sum and average on the screen as follows: The sum is n and average is m. Where n and m are the computed sum and average, respectively.

  • C program. Using do-while loop for this question. Question: write a program to calculate the average...

    C program. Using do-while loop for this question. Question: write a program to calculate the average of first n numbers. output: Enter the value of n : 18 The sum of first 18 numbers =171 The average of first 18 numbers = 9.00 my code couldn't give me the right avg and sum. Please help. #include<stdio.h> int main() {     int num;     int count =0;     int sum=0;     float avg;      printf("Enter the value of n: ");    ...

  • Write an HTML file that creates the following table on a web page. Important notes: 1....

    Write an HTML file that creates the following table on a web page. Important notes: 1. You should have to copy and paste the “HTML script” as your answer to this question. DON’T take a screenshot for your HTML script. It must be an editable script. 2. Take a screen shot for your output web page and paste it as a part of your answer. . SEU COURSES COURSE CLASS -ROOM INSTRUCTOR IT 404 CLASS ROOM 1 DR ALI CLASS...

  • need help!! c++ HW_6b - Calculate the average Use a do-while loop Write a program that...

    need help!! c++ HW_6b - Calculate the average Use a do-while loop Write a program that first prompts the user for an upper limit: Enter the number of entries: 5 € (user enters 5) After the user enters a number, the program should prompt the user to enter that many numbers. For example, if the user enters 5, then the program will ask the user to enter 5 values. Use a do-while loop to add the numbers. o With each...

  • Create a while loop that will execute the following code 12 times using a counter that...

    Create a while loop that will execute the following code 12 times using a counter that starts at 1 and is incremented by 1 each time through the loop. Within the while loop, create a switch statement that will print out the number of days in each of the months of the year. - Use fall through capabilities so that you only have one print statement for all of the months that contain 31 days. Do not worry about leap...

  • Please write a java program that inputs positive numbers using a while loop until a negative...

    Please write a java program that inputs positive numbers using a while loop until a negative number is input and finds the sum of the numbers input

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT