Programming in C
Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
Question
Book Icon
Chapter 6, Problem 6E
Program Plan Intro

Program Plan:

  • Include required header files.
  • Declare the function “main ()”.
    • Declare required variables “var1”, “var2”, “var3”, and “i”.
    • Print the values of “var1”, and “var2”.
    • Loop from 0 through 13 using “for” loop.
      • Add the value of “var1” and “var2” and store it in a variable “var3”.
      • Assign the value of “var2” to “var1”.
      • Assign the value of “var3” to “var2”.
      • Print the value of “var3”.
    • Return the statement.

Blurred answer
Students have asked these similar questions
Please submit your solution to the lab instructor once you have your program working. Your lab instructor will tell you how (s)he would like you to turn it in. Failure to submit will result in a zero.    Write a program that asks the user to input two integers a and b. Then create an array that has all integer from a to b. Print out the array. (Don’t forget to consider the situation of a=b, a<b, and a>b.)   Example 1: Input two numbers: 6 2 Array is [6, 5, 4, 3, 2]   Example 2: Input two numbers: 4 8 Array is [4, 5, 6, 7, 8]   Pass the above array as a parameter to a method called average and return the average and print it out in the main method. (Do not use Math library to get the average.)   Please attach your screenshot below to each question a and b.
I need help with this homework question, and please explain why certain parts go where "Write a program that displays the following pattern of prime numbers using a nested forloop. You must generate the prime numbers—you are not allowed to store the primenumbers in an array beforehand and print them from the array."
Write a program that creates a two dimensional array with 4 rows and 3 columns that contains the below numbers. Let the computer prompt you to enter these numbers. 8 6 1 7 3 0 2 5 9 5 6 7 After that, calculate and print the total and average of these values.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education