Computer Science: A Structured Programming Approach Using C, Third Edition
3rd Edition
ISBN: 9780534491321
Author: Behrouz A. Forouzan, Richard F. Gilberg
Publisher: Course Technology, Inc.
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 6, Problem 33PS
Write a for loop that will produce each of following sequences:
a. 6, 8, 10, 12, ..., 66
b. 7, 9, 11, 13, ..., 67
c. The sum of the numbers between 1 and 15 inclusive
d. The sum of the odd numbers between 15 and 45 inclusive
e. The first 50 numbers in the series 1, 4, 7, 10, ... (calculate the total 1 + 4 + 7 + 10 + ...)
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Write a for loop that will produce each of the following sequences:a. 6, 8, 10, 12,.......66b. 7, 9, 11, 13,....67c. The sum of the numbers between 1 and 15 inclusived. The sum of the odd numbers between 15 and 45 inclusivee. The first 50 numbers in the series 1, 4, 7, 10,....(calculate the total 1 + 4 + 7+10 + .........)
Problem:Write a for loop that will produce each of the following sequences:a. 6, 8, 10, 12,.......66b. 7, 9, 11, 13,....67c. The sum of the numbers between 1 and 15 inclusived. The sum of the odd numbers between 15 and 45 inclusivee. The first 50 numbers in the series 1, 4, 7, 10,....(calculate the total 1 + 4 + 7+10 + .........)
Write a for loop that displays the following set of numbers:
0, 20, 40, 60, 80,…..1000
(Note there is a comma between the numbers but not the last one)explain please.
Chapter 6 Solutions
Computer Science: A Structured Programming Approach Using C, Third Edition
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write your codes in a single m.fileWrite commend to each line for explaining the line using for looparrow_forwardEXERCISE 19 Write a program using for loop that generates a multiplication table for any integer (given by the user) up to any multiple (also given by the user). Your output should be similar to what is given in the sample below. Sample Output >> exercise19 Enter the number for which you want to create the multiplication table: 91 Enter the number up to which multiplication table is required: 5 91 X 1- 91 91 X 2 = 182 91 X 3 - 273 91 X 4 - 364 91 X 5- 455 >> Electronic Engineering Technology---MATLAB Tutorialarrow_forwardWrite a for loop that iterates 6 times. Each iteration: Put userNum to output. Then, put "," to output. Then, assign userNum with userNum multiplied by 3. Ex: If input is 2, then output is: 2,6,18,54,162,486,arrow_forward
- Write a for loop that iterates through numbers from 1 to 10, adds them up together, and prints the total. The printed output should be 55.arrow_forwardProgram51.java Write a program that uses a while loop to generate 49 random integers, all from 20 to 49, inclusive. The same loop should print the integers in seven rows and right-aligned in columns seven characters wide. The program should report both the count and the total of integers in the 20s, 30s, and 40s. See Sample Output.Sample Output (IMAGE BELOW) Program52.java Write a program that prompts the user for a binary number (from 3 to 8 bits) as a String and converts it to base-10 decimal value. There are several ways to do this in Java but your program must use a for loop and first principles to perform the conversion. Print the base-10 number when the loop ends.Program53.java Write a program that uses a for loop to print a table of the square roots, squares, cubes, and cube roots of the integers from 5 to 15, inclusive...five columns in all. Values in both roots columns should display in columns 9 characters wide with 5 decimals. All other columns should display in columns 7…arrow_forward2. Use any loop of your choice to print all numbers between 10 and 100 that are divisible by 5. Print the sum of all the numbers divisible by 5.arrow_forward
- please dont use for or while loop.arrow_forwardWrite the following loops. a. Write a while loop that prints all the even numbers from 1 to 100 (inclusive). b. Write do while loop to print all the odd numbers from 1 to 100 (inclusive).arrow_forwardPROGRAM VBA (EXCEL) ONLY PROGRAM VBA (EXCEL) ONLY PROGRAM VBA (EXCEL) ONLY How to write a for loop to define the IsNumeric, I wrote this one but when the first cell starts with text, it will show "none" but if the first cell starts with a number, it is ok to proceed. Can anyone help to resolve this? Sub test() Dim a, b as Range For Each a in b If IsNumeric(a) = True Then Range("C1") = WorksheetFunction.Sum(b) Else Range("C1") = "none" End If Next End Subarrow_forward
- Aim Using a for loop and a range function, you have been asked to find the even numbers between 5 and 55 and then find their sum. Steps for Completion 1. Define a counter for the sum named total_sum. 2. Define a for loop with an even range for numbers between 5 and 55. 3. Add each looped number to the sum. 4. Outside the loop, print out total_sum. The output should be as shown in Snippet 3.50: 750 Snippet 3.50arrow_forward14. Write a for loop to print all even numbers between 1 and 20. 15. Repeat with a while loop. Use Matlabarrow_forwardWrite a for loop that prints the multiples of 3 from 300 down to 3.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
C++ Programming Tutorial 36 - Intro to Loops; Author: Caleb Curry;https://www.youtube.com/watch?v=M3o7Y0juEP0;License: Standard YouTube License, CC-BY