mathematical power function

rtf1ansiansicpg1252deff0nouicompatdeflang1033fonttblf0fnilfcharset0
Calibri;

*generator
Riched20 10.0.18362viewkind4uc1

pardsa200sl276slmult1ulbf0fs22lang9
ASSIGNMENT 1.ulnoneb0par

Create
a mathematical power function. The function signature is par

int
power(int base, int exp)par

The
function MUST use a for loop and use the same methodology we used in
class. However this version will use a function.par

The
function cannot use input/output (i.e. cin or cout) inside the power
function. However, you can use cin and cout in main if you want to
prompt the user for the base and exponent.par

par

ulb
ASSIGNMENT 2.par

ulnoneb0
Create a struct describing a car engine. The variables will be
current_rpms, max_rpms, num_cylinders, and displacement. Choose
reasonable data types as we did in class. par

Create
a function which returns a bool called is_safe that takes a pointer
to your engine. If current_rpms < max_rpms then the engine is in a
safe state.par

Create
a main function and an instance of your engine struct. You can set
num_cylinders to 8 and displacement to 6.0. Set max_rpms to 6000
current_rpms to 5000 and test your function.par

Then
set current_rpms to 6100 and rerun your function.par

cout
the result for all your testspar

This
assignment must use pointers.par

The post mathematical power function appeared first on My Assignment Online.