馃攳
dog house building project c++ - YouTube
Channel: Online Education Academy ZA
[0]
five four
[2]
three
[3]
two
[4]
one let's go
[8]
welcome to online education academy's
[10]
eddie
[11]
on today's lesson will be
[14]
learning about
[16]
okay let me stop this
[18]
on today's lesson and be learning about
[21]
um
[22]
functions building function in c plus
[24]
plus
[25]
right we'll say hashtag include our
[27]
stream hashtag include symmets
[30]
because we'll include maths
[32]
rights using namespace sct
[34]
in main
[35]
so instead in
[37]
inside main
[39]
will create a constant double
[42]
cost per square feet right we are
[44]
creating a dog house
[46]
right we'll see how much does the dog
[49]
house
[50]
cost
[51]
by
[53]
cost with the square feet
[56]
all right so we'll be calculating cost
[58]
based on
[59]
uh
[60]
the area of the dog house
[62]
right
[63]
this is a constant double so which means
[65]
it's constant it never changed the cost
[67]
is going to be 100
[70]
per square feet
[71]
right
[72]
so we have double length side
[76]
we have budget and we have the error
[78]
that you want to have
[80]
so the cost we want to want to calculate
[82]
it according to the budget that you have
[84]
for the doghouse right and then you'll
[87]
see out enter your budget amount right
[90]
you must enter your budget amount
[92]
and then you input the budget
[94]
all right the company will tell you
[97]
that you must enter your budget if you
[99]
have a
[100]
hundred round patches
[103]
which means you'll have a one square
[104]
feet
[107]
length
[111]
length per side it should be one square
[113]
feet right
[115]
so our area is equals to budget
[118]
divided by
[120]
what's cost per square feet
[122]
right so that
[123]
so that's our talk house it's it comes
[126]
within your budget and you don't use a
[128]
lot of material for less money like this
[131]
program is quite helpful with that
[134]
so this is the use of c plus plus in
[136]
real life scenarios for programs that
[138]
you can use
[140]
right our length side is close to square
[143]
square root
[144]
and then we takes one parameter inside
[146]
the bracket it takes the area
[148]
right it takes the area
[152]
so our error is going to be what so we
[154]
want the square root of the area which
[155]
means
[157]
that the variables we get for area we
[160]
want the square root for it
[163]
all right
[165]
so this is quite interesting if you take
[167]
a look at it
[168]
quite interesting
[170]
so
[171]
all right
[172]
in our program so it's gonna depend on
[174]
the budget so we have to
[177]
output
[178]
constant right say outset f so these are
[181]
the fixed values
[183]
right
[185]
so if you run the program it says enter
[187]
your purchase amount
[189]
if it's 200
[192]
rent
[193]
so you get
[194]
1.41 square foot on each side each side
[198]
is going to be one point four one square
[200]
foot
[201]
that's the third house
[202]
so the more the more you patch it the
[204]
bigger the house is going to be
[207]
that's what this problem is saying right
[210]
if you run it again
[211]
with the last budget
[214]
purchase of 20
[216]
20 rand so it's gonna be 0.45 square
[219]
square foot
[221]
so this one tells us
[223]
the size of the house that you must
[225]
build based on your budget how much
[227]
money you have
[229]
right if you are getting value from this
[231]
channel
[232]
you can let me know
[233]
in the comment section that you are
[234]
getting value from this channel and you
[236]
want to learn more from it
[238]
it's online education academy
[241]
right
[242]
we see
[243]
okay we can we can enter
[245]
another value we'll enter 500
[248]
for 500 rand
[251]
you get the 2.24 so the more money you
[253]
have the bigger the dog house
[256]
which means
[257]
the person who's making the dog house is
[258]
not losing
[259]
and you're also getting
[263]
the dog house that has enough space to
[265]
fit your dog
[266]
right
[267]
if you are carrying value from this the
[269]
square roots it's a built-in function
[271]
that is that is inside
[273]
c plus plus
[275]
and if you're carrying values from this
[276]
channel please let me know in the
[277]
comment and please do consider
[279]
subscribing on online education academy
[283]
zda until next time
Most Recent Videos:
You can go back to the homepage right here: Homepage