A.Given two integers 20 and 10, write a program that uses a function add( ) to add these two numbers and sub( ) to fi nd the difference of these two numbers and then display the sum and difference in...

A.Given two integers 20 and 10, write a program that uses a function add( ) to add these two numbers and sub( ) to fi nd the difference of these two numbers and then display the sum

and difference in the following form:


20 + 10 = 30


20 – 10 = 10


B. Modify the above program to provide border lines to the address.


C. Write a program using one print statement to print the pattern of asterisks as shown below:


D. Write a program that will print the following fi gure using suitable characters.


E. Area of a triangle is given by the formula


where a, b and c are sides of the triangle and 2S = a + b + c. Write a program to compute


the area of the triangle given the values of a, b and c.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here