Please I need help regarding this c++ peoblem



You need to write a code, which will calculates results, depending on the values that user enters to the running software: i.e.
1) Y=1/A i.e Y – is result, A is a variable, and it is known, that the variable A has values from the interval: A_begin, A_end, and the step (A_step) which describes the step (speed) in which variables varies. Result should be printed out in „table“ that it has columns, and we can easy recognize, which column has values of Y, and which column has values of A, etc.

Let say; we have several examples: A_begining = 1, A_end = 4, A_step = 1, that the software should make calculations on several A values (Y=1/1, Y=1/2, Y=1/3, Y=1/4) and print out the values of A and result of Y, every time it will make calculations.

If we have A_begining = 1, A_end = -4, A_step = -1, your software should make all posible calculations with A values (1, 0, -1, -2, -3, -4) , and print result on spcreen. You need to make software that it will not HANG, and run correclty on any A values, that user will enter to it. All examples that you need to pay attention when caculations can be done, and when not, what condition of A_begin vs A_end and A_step should be analyzed where explain in 116 room.



The result in table could be provided such way (or like this)



!-----------------!---------------!

! value of A ! result Y !

!-----------------!---------------!

! 1 ! 1.0 !

! 2 ! 0.5 !

------------------------------------



And so on....







The same is for others three calculations.

Y=B/SQRT(A), B and A – provided bu user

Y = C/(B-A), all values provided bu user, BUT:

Y=xN X and N provided by user
do you have any code that you already started on?
I assume you are writing a console program. To do this, I would make an array of ints that store the user values, then you use these ints in the equations that you specified you need for the program.

To format it with columns, you should be able to do that with using cout and spacing it out.
I can't do it,, please help me with the codes, thank you
jheard901, please can you help me, I need it urgently. Than you.
the way this site works is that you have to give us a start that you made
Topic archived. No new replies allowed.