Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,360 --> 00:00:02,410
Welcome back to another challenge.
2
00:00:02,490 --> 00:00:06,690
And you should solve this challenge right after you've studied casting.
3
00:00:06,960 --> 00:00:13,980
So in the previous video, we've talked about casting in general as well as we've seen a couple of examples
4
00:00:13,980 --> 00:00:18,030
to how casting can be used in C programming language.
5
00:00:18,340 --> 00:00:24,810
And now we want to go back to one of the first exercises we've done where we calculated the average
6
00:00:24,810 --> 00:00:26,940
grade between two given grades.
7
00:00:27,210 --> 00:00:32,970
And so in this challenge, I want you to write a program that reads from the user of three grades of
8
00:00:32,970 --> 00:00:38,340
typing and of course, and then the program should print the exact average between them.
9
00:00:38,540 --> 00:00:45,360
And by saying the exact average grade, I mean that it should be a free floating point type if necessary,
10
00:00:45,660 --> 00:00:51,330
with these dot precision and not round to any side just to keep it as an integer.
11
00:00:51,570 --> 00:00:58,410
So, for example, if the calculated average grade is something like ninety two point five, then that's
12
00:00:58,410 --> 00:01:01,230
the exact number that should be printed on the screen.
13
00:01:01,470 --> 00:01:07,980
And not just 92, as we've seen, that may happen if nothing is in casting correctly or not used in
14
00:01:07,980 --> 00:01:08,790
casting at all.
15
00:01:09,060 --> 00:01:13,590
So once again, in this exercise, you have to apply the casting process.
16
00:01:13,980 --> 00:01:18,570
The average rate should be calculated between the given three grades.
17
00:01:18,840 --> 00:01:22,320
The grades must be of type in and the printed result.
18
00:01:22,440 --> 00:01:27,990
The average should be of a floating point type, meaning that if the final grade should be, let's say,
19
00:01:27,990 --> 00:01:34,800
eighty five point seven, then eighty five point seven will be printed on the screen and it will not
20
00:01:34,800 --> 00:01:37,410
be round to any integer like 85.
21
00:01:38,040 --> 00:01:45,330
So I hope you have got the point that snotting complex exercise is just to emphasize and practice a
22
00:01:45,330 --> 00:01:45,780
little bit.
23
00:01:46,170 --> 00:01:52,560
The topic of casting that we've just learned, and I wish you good luck and I'll see you in the Solutions
24
00:01:52,560 --> 00:01:52,980
video.
2602
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.