C programming for the beginners | problem | solution ANSI C balagurusamy | chapter 1(1.7)

In AnsiC balagurusamy problem no 1.7 in chapter
1 given two integers 20 and 10 write a program
that uses a function add() to add these two numbers and sub() to find the difference of
these two numbers and then display the sum and difference in the following form: 20 + 10=30
20 – 10=10 we will use two function add and sub by this
we will take two integer 20 and 10 which will show in the display
so go to the program now its similar to the privious lecture
there will #include , main function then we will take two integer
by int a ,b ; now we will take two function add and sub
where sum will show in add function and in sub funtion we will see the subtraction
now as a and b are given so we will define that
so we have to show in this format so now we will print
by printf as the two addition are shown by add
same process in the below you can give return zero
now its time to run there is a problem
as we define these two values again run
so we get our result but in one line and one more problem
we have to define these previously and there give n
now run here is our result we will see the other problem of balagurusamy
in next lecture please subscribe us for more update

Tags: , , , , , , , , , , , , , , , , , , , ,

There are no comments yet

Why not be the first

Leave a Reply

Your email address will not be published. Required fields are marked *