CPRG Unit 1 program with solution

Unit 1 programs with solution and .c extention file..

1.  Find Simple Interest. Inputs are principal amount, period in year and rate of interest.

2.  Find the area and perimeter of square and rectangle. Input the side(s) through the keyboard.

3.  Accept any three numbers and find their squares and cubes.

4. Write a program to enter the temperature in Fahrenheit and convert it to Celsius.[C = ((F-32)*5)/9].

5.  Write a program to store and interchange two numbers in variables a and b.

6.  Write a program to accept an integer and display it in octal and hexadecimal formats.

7.   Write a program to enter text with gets() and display it using printf() statement also find the length of the text.

8. Write a program to enter two numbers and find the smallest out of them. Use conditional operator.

9. Write a program to enter a number and carry out modular division operation by 2, 3 and 4 and display the remainders. 

10. Write a program to find the average temperature of five sunny days. Assume the temperature in Celsius. 

Comments

Popular posts from this blog

C++ Practice Program

Cloud Computing Important Question-Answer for University Exam

Software Testing Gujarat University Important Questions For Exam