Ask the user to type on the keyboard any user-supplied value

Assignment Help Computer Engineering
Reference no: EM132106324

Program 1: Design a program in C which, when executed, will do the following in the indicated sequence:

1. Ask the user to type on the keyboard any user-supplied value of a positive integer number n.

2. The program will then compute, for one time only, using the WHILE looping command, the value of the number called here zNo(n) defined as the sum of the squares of all the integers lying between and including 1 and n, i.e., tNo(n) = 12 + 22 + 32 + ...+ n2.

3. The program is then to display on the console the user-supplied value of n as well as the corresponding value of zNo(n) in the format shown below: n=3 ===> zNo(3)=14.

Program 2: Modify program 1 above so that it computes and then displays on the console computations of zNo(n) for a user-specified values of n as in Program 1 but now in an infinite loop.

Program 3: Modify program 1 above so that it computes and then displays on the console computations of zNo(n) for a user-specified value of n as in Program 1 but now for a user-specified number of times denoted ntimes.

Program 4: Modify program 1 above so that it computes and then displays on the console computations of the function mzNo(nstart,nstop), called modified zNo(n) and defined as the sum of the squares of all the integers lying between and including nstart and nstop, i.e., mzNo(nstart,nstop) = nstart2 + (nstart+1)2 + (nstart+2)2 + ...+ (nstop-1)2 + nstop2.

In this program, the computation of mzNo is to take place a user-specified number of times. Flowcharts: Draw a flowchart for each of the above four programs.

Reference no: EM132106324

Questions Cloud

Perform three function calls : Write a program that does the following: .Declare three integer variables in main0, called var1, var2, var3 .
Write the function body for each : Fix this program, so that this program prints out the numbers 1 to 10. What does it do as currently written ?
Convert the character in r0 from upper-case to lower-case : Convert the character in R0 from upper-case to lower-case by operating on it, NOT replacing it. The lower-case converted character should stay in R0.
Difference for a two-tailed test : If the sample mean difference (i.e. M1 - M2) is 8 points, is this enough to indicate a significant difference for a two-tailed test at the .05 level?
Ask the user to type on the keyboard any user-supplied value : Modify program 1 above so that it computes and then displays on the console computations of zNo(n) for a user-specified values.
What age and stage does this issue typically impact a person : At what age and stage does this issue typically impact a person? What is its potential impact on a person's development progress?
What program is best for accepting ios front end code : What program is best for accepting iOS front end code from my developer ?
Create multiple threads with runner functions : Create multiple threads with runner functions which include individual threads roles.
Change of neonatal competence : What are the implications for methods of child rearing due to the change of neonatal competence?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd