Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Electrical & Electronics Expert

Designing and testing the functionality of the following four programs:

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 a user-supplied value of a positive integer number n.

2. The program will then compute, for one time only, using the "for" looping command, the value of what is called here the zNo(n) defined as the series
zNo(n) = 1x2 + 2x3 + 3x4 + ...+ (n-1)xn.

3. The program is then to display on the console the user-supplied value of nas well as the corresponding value of tNo(n) in the format shown below:
n=3===>zNo(3)=20.
Produce two sample outputs, one for n=3 and the other for n=5.

Program 2:
Modify program 1 above using "while" looping so that it computes and then displays on the console computations of zNo(n) for auser-specified value of n as in Program 1 but now in an infinite loop. Your sample output is to display values of n and zNo in the same format as in Program 1 but for the following 5 values of n:
n=2, 3, 4, 5, and 6.

Program 3:
Modify program 1 above using "while" looping so that it computes and then displays on the console computations of zNo(n) for a user-specified valueof n as in Program 1 but now for a user-specified number of timescalled ntimes. Your sample output is to display values of n and zNo in the same format as in Program 1 for the same 5 values of n as in Program 2.

Program 4:
Modify program 1 above using "while" looping so that it computes and then displays on the console computations ofzNo(n) for equally spaced values of n from and including a user-specified starting value of n called nstart to a user-specified ending value of n called nstop, with user-specified equal increment from one value of n to the next value of n called nstep. The output in the present program is to be displayed as a 2-column table with the first column being n and the second column being zNo. The two columns in this table are to be 16 digits wide and the values of n and zNo are to be left justified within the columns. In your computations, use nstart=3, nstop=8 and nstep=2.

Electrical & Electronics, Engineering

  • Category:- Electrical & Electronics
  • Reference No.:- M91973474
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question? 


Related Questions in Electrical & Electronics

Summative assessmentin 2017 sej101 assessment will consist

Summative Assessment In 2017 SEJ101 assessment will consist of nine tasks that will develop a portfolio of your assessed work. Throughout the trimester you will have the opportunity for feedback on all nine tasks before ...

Problem 1 a two-phase servomotor has rated voltage applied

Problem 1: A two-phase servomotor has rated voltage applied to its excitation winding. The torque speed characteristic of the motor with Vc = 220 V, 60 Hz applied to its control phase winding is shown in Fig.1. The momen ...

Electrical engineering questions -q1 two ideal voltage

Electrical Engineering Questions - Q1. Two ideal voltage sources designated as machines 1 and 2 are connected, as shown in the figure below. Given E 1 = 65∠0 o V, E 2 = 65∠30 o V, Z = 3Ω. Determine if Machine 1 is genera ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

Nanotechnology engineering program assignment - passive

Nanotechnology Engineering Program Assignment - Passive Filters Q1) Determine what type of filter is in circuit shown. Calculate the cutoff frequency f c . Q2) Determine what type of filter is in circuit shown. Calculate ...

Questions -problem 1 - a series rlc network has r 2 komega

Questions - Problem 1 - A series RLC network has R = 2 kΩ, L = 40 mH and C = 1μF. Calculate the impedance at resonance and at one-fourth, one-half, twice, and four times the resonant frequency. Problem 2 - Design a serie ...

Question 1 in the voltage regulator circuit in figure p221

Question 1: In the voltage regulator circuit in Figure P2.21, V 1 = 20 V, V Z = 10 V, R i = 222Ω and P z (max) = 400 mW. (a) Determine I L, I z , and I L , if R L = 380Ω. (b) Determine the value of R L , that will establ ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

Question 1 a pnp transistor withnbspbeta 60 is connected

Question 1. A pnp transistor with β = 60 is connected in a common-base configuration as shown in figure P5.8 (a) The emitter is driven by a constant-current source with I E = 0.75 mA. Determine I B , I C , α, and V C . ( ...

Problems -problem 1 - find v0 in the op amp circuit of fig

Problems - Problem 1 - Find v 0 in the op amp circuit of Fig. 1. Problem 2 - Compute i 0 (t) in the op amp circuit in Fig. 2 if v s = 4 cos(10 4 t). Problem 3 - If the input impedance is defined as Z in = v s /I s , find ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As