Pratique du Shadowing: Useful math related functions in C++ 🔱 - Apprendre l'anglais à l'oral avec YouTube

B2
Hey guys, in this video I'm going to show you 8 useful math related functions in C++.
⏞ En pause
52 phrases
Si les phrases sont trop courtes ou trop longues, cliquez sur Edit pour les ajuster.
1
Hey guys, in this video I'm going to show you 8 useful math related functions in C++.
2
Let's begin by creating 3 variables.
3
Double x, and I will set this to be 3.
4
Double y, that will be 4.
5
Then double z, we will declare this but not yet assign it.
6
The first useful math related function is the max function, which will return the greater of 2 values or variables.
7
I'll assign the result within z.
8
z equals standard max parentheses.
9
Within the parentheses, add two values or variables.
10
I'll compare x and y.
11
Then let's display the result.
12
Standard output, I would like to display whatever z is.
13
The greater number between 3 and 4 is, well, you guessed it, 4.
14
Alternatively, there's the min function.
15
z equals standard min let's compare x then y
16
so the minimum between these two values would be three
17
so that's max
18
and min now the rest of these functions are found within
19
the cmath header file at the top of our file let's
20
include cmath we have the pow function to raise a base to a given power.
21
z equals pow, or power.
22
Let's raise two to the power of three.
23
z would be eight.
24
Two to the power of four would be 16.
25
That's the power function.
26
Then we have square root z equals sqrt.
27
What's the square root of nine?
28
Well, the square root of nine is three.
29
Then we have absolute value z equals abs.
30
If you place a negative number within the absolute value function, it will give you the positive version of that number, how far it is away from zero.
31
So negative three, the absolute value of negative three would be three.
32
That is the absolute value function.
33
Next, we have the round function.
34
Let's change X to 3.14.
35
Z equals round.
36
Let's round X.
37
3.14 rounded would be three.
38
If you need to round up, there's a ceiling function.
39
Z equals seal.
40
Seal means ceiling.
41
Let's round X.
42
X rounded up is 4.
43
Alternatively, there's the floor function, which will always round down.
44
Let's change X to 3.99 to test it.
45
Z equals floor X.
46
X rounded down is three.
47
So yeah, everybody, that is a super quick video on a few useful math-related functions.
48
If you head to this URL, c++.com slash reference slash cmath, there's a lot more useful math functions that you may be interested in,
49
but we just covered a few of the basics.
50
In the next topic, we're going to create a practice program to find the hypotenuse of a right triangle.
51
So yeah, those are a few useful math-related functions in C++.
52
Thank you.

Télécharger l'application

Everything you need to speak fluently

AI PronunciationScore every sentence
IPA PracticeMaster every sound
VocabularyBuild your word bank
Vocab GameLearn while playing
Scanner pour télécharger
Scanner pour télécharger

About This Lesson

In this lesson, you will practice your English speaking skills by engaging with content that explains useful math-related functions in C++. As you listen to the transcript, you will familiarize yourself with technical vocabulary and phrases. Through this exercise, you will enhance your comprehension and pronunciation. Additionally, by applying the shadowing technique, you can significantly improve your fluency and confidence when discussing mathematical concepts in English. This lesson is perfect for anyone looking to integrate programming vocabulary into their English speaking practice while preparing for IELTS speaking practice.

Key Vocabulary & Phrases

  • Max function: Returns the greater of two values.
  • Min function: Returns the lesser of two values.
  • Power function: Raises a base to a given exponent.
  • Square root: The number which produces a specified quantity when multiplied by itself.
  • Absolute value: The non-negative value of a number regardless of its sign.
  • Round function: Rounds a number to the nearest whole number.
  • Ceiling function: Rounds a number up to the nearest whole number.
  • Floor function: Rounds a number down to the nearest whole number.

Practice Tips

To maximize your learning experience while watching the related content, consider using the shadowing technique. This involves listening to the speaker and simultaneously repeating what they say. Start by pausing the video after each sentence to practice your pronunciation. This method is especially beneficial when the speaker demonstrates a technical concept, like the max and min functions in C++. Pay close attention to the pacing and tone of their speech. The natural speed might challenge you at first, but with consistent practice, you will improve your ability to keep up with similar conversations.

Incorporate vocabulary from the key vocabulary & phrases section into your practice. For instance, after shadowing a sentence about the 'power function', try to create your own sentences using the same terminology. This will not only help you with your vocabulary retention but will also prepare you better for situational English speaking practice. Make the most of resources like learn English with YouTube to come across similar content repeatedly. This kind of repeated exposure is key as you prepare for IELTS speaking practice.

Qu'est-ce que la technique du Shadowing ?

Le Shadowing est une technique d'apprentissage des langues fondĂ©e sur la science, dĂ©veloppĂ©e Ă  l'origine pour la formation des interprĂštes professionnels. Le principe est simple mais puissant : vous Ă©coutez de l'anglais natif et le rĂ©pĂ©tez immĂ©diatement Ă  voix haute — comme une ombre suivant le locuteur avec un dĂ©calage de 1 Ă  2 secondes. Les recherches montrent une amĂ©lioration significative de la prĂ©cision de la prononciation, de l'intonation, du rythme, des liaisons, de la comprĂ©hension orale et de la fluiditĂ©.

☕ Offrez-nous un cafĂ©