c++ program to add two integers [w/ subs]



00:00:00 – Terrence I am back with a new video
00:00:02 – about c++ in the previous video we learn
00:00:06 – about the basics but now in this video
00:00:10 – we are going to talk about a program
00:00:14 – which is called the addition program in
00:00:17 – C++ okay if you don't watch my previous
00:00:20 – video in the previous videos we talked
00:00:24 – about the basics but if you didn't hold
00:00:29 – it go work it now okay the link is in
00:00:33 – the description okay you will need an
00:00:37 – application turbo c++ and the hydrofoil
00:00:41 – class has to include iostream dot H for
00:00:47 – input/output operator and canoe dot H
00:00:50 – for control input output operators okay
00:00:54 – voi d ma I n YN signifies the main as we
00:00:59 – learned in previous video now CLR scr
00:01:06 – for clearing the previous outputs and we
00:01:12 – have to declare integer if we want to if
00:01:17 – we want to make a program better only
00:01:22 – the main part of the integer which is
00:01:25 – before the decimal okay before the
00:01:28 – decimal integer only takes int a comma B
00:01:35 – semicolon if we are declaring it as an
00:01:38 – integer it only takes the Volusia it
00:01:42 – only takes the values with or without
00:01:47 – decimal part okay if we add plot in at
00:01:51 – the place of integer I am I writing it
00:01:53 – with a yellow spot the difference of
00:01:58 – integer ever we use float it take before
00:02:01 – drag a decimal and after the decimal Oh
00:02:05 – but integer is you devil so okay advert
00:02:10 – we had we are adding closed now FL 08 t
00:02:13 – ok now the center float alien be we have
00:02:18 – added float a and B because of the
00:02:22 – decimal ok now let's move ahead and what
00:02:27 – was the program about for adding two
00:02:29 – integers so we have to present the way
00:02:35 – of the present and output of output
00:02:39 – statement which says that input the
00:02:41 – values for a env so let's write please
00:02:45 – inter the values of a and B or we can
00:03:00 – say it as interior first and second ok
00:03:05 – all the integers that you want to
00:03:08 – subtract then semicolon then enters ok
00:03:11 – then see in he in takes the input ok see
00:03:17 – out dismissed displays a statement on to
00:03:21 – the screen and he in takes the input
00:03:23 – from the user ok so the user to see in
00:03:31 – the sign side to put here I am I
00:03:35 – lighting with the yellow spot as you can
00:03:36 – see see in a it can be seen beyond three
00:03:40 – in a and it can be a and B as well now
00:03:46 – don't put semicolon here because we are
00:03:49 – taking it in a single statement okay see
00:03:55 – in a then don't put semicolon to signs
00:03:58 – and then be then semicolon ok you can
00:04:02 – take it again in means you can take with
00:04:06 – different co can see any statement by
00:04:08 – it takes a lot of time and there is no
00:04:12 – need of taking to CNN's your segment so
00:04:15 – I am adding i am adding in a single
00:04:18 – co-treatment and you might be continued
00:04:21 – that why i then took seen here on the
00:04:27 – right side of a and B because on which
00:04:33 – variable we will give the output okay
00:04:36 – that you will understand now because the
00:04:38 – good programmer is that which consumes
00:04:41 – less memory okay co UTC out inverted
00:04:48 – comma Dee Dee edition yes give it a go
00:05:01 – to and after the I am I rating it defies
00:05:07 – your statement give a bit of space okay
00:05:10 – in the inverted commas okay there are
00:05:13 – two spaces went to okay okay then don't
00:05:19 – put semicolon here okay we are
00:05:22 – displaying any statement in the output
00:05:27 – in a single real statement so put the
00:05:30 – signs here and a plus B okay a plus B
00:05:36 – then det CH get CH semicolon enter curly
00:05:44 – braces close control f 94 running a
00:05:46 – program it ran successfully so now
00:05:49 – putting the values for example 120 plus
00:05:52 – 80 it will be 200 inter 200 is revalue
00:05:58 – okay thanks for watching my video share
00:06:01 – this video and subscribe my channel if
00:06:02 – you are not a subscriber thank you and
00:06:04 – have a nice day


Video Url:
http://youtu.be/fY8KUjc3ryM

Comments

comments