You are on page 1of 2

# C Programming Language: Problems on Data Types, Variables, Operators-Expressions and Functions

## PART A: Begin Your Journey with the Problems

1. Write an interactive program to demonstrate the process of multiplication. The program should ask the user to enter two two-digit integers and print the product shown below: Input: 45 37 45 X 37 7 X 45 is 315 3 X 45 is 1350 Adding them 1665 2. Write down a program that can take two numbers (a, b) as input and find out the addition (a+b), subtraction (a-b), multiplication (a*b) and division (a/b) of two numbers. (also do this with function calling) 3. Write down a program that can take the radius of a circle and find out its Area. (You must use the symbolic constant). (also do this with function calling) 4. Write down a program that can take the base and height of a triangle and then find out its Area. (also do this with function calling) 5. Write a program which will take seconds as input and show years, months, days, hours, minutes and seconds as output. (use long int for taking input) 6. Write a program which will take Celsius temperature as input and give Fahrenheit as output. (try some other unit conversion problems) Output

## PART B: Cover This Section after Completing problems of doc-2

1. Write a program which will take 4 numbers as input from the user and return which is largest among them. Do it using functions.

2. Write a function named area to calculate the area of a triangle. The function accepts the six coordinate points (x1, y1, x2, y2, x3, y3). The function area will call another function named arms to calculate the lengths (a, b, c) of the three arms of the triangle using corresponding coordinates. Then using the values a, b, and c function area will calculate the area. 3. ***Do the problems (which can be done) in doc-2 using function calling. Such as, to check a number is prime or not, take input from the user in main function then pass the value to another function namely prime_check to check whether it is prime or not. And in case of series evolution problems, take the value of x and n (according to