Exercise: Arithmetic Operators

 Exercise: Arithmetic Operators

WAP to input two numbers and find sum.

Solution:    

WAP to input two numbers and find multiplication.

Solution:    


WAP to input number and calculate its square and cube.

Solution:   


WAP to input length and breadth of a rectangle and calculate its area. Area=Length*Breadth.

Solution:  


WAP to input radius and calculate area of circle and circumference of a circle. Area of circle = 3.14*r*r, Circumference of circle = 2*3.14*r

Solution:  


WAP to input radius and height of a cylinder and calculate volume of cylinder. Volume=3.14*r*r*h

Solution: 


WAP to input principal, rate, time and calculate Simple Interest. Simple Interest=Principal*Rate*Time/100.

Solution:  

WAP to Input 5 subject marks of a student and find total marks and percentage obtained by the student.

Solution:  


WAP to convert temperature from Fahrenheit to Celsius. C=(F-32)*5/9.

Solution:   


WAP to convert temperature from Celsius to Fahrenheit. F=C*9/5+32.

Solution: 


WAP to Input two numbers and swap them.

Solution: 


WAP to Input two numbers and swap them without using 3rd variable.

Solution: 


WAP to Input distance (in km) and convert in meter, centimeter, and inches.

Solution:   


WAP to Input minutes and convert in hours and minutes.

Solution: 


WAP to input total number of days and convert it into y

ears, months, weeks, and days.

Solution: 


Comments

Popular posts from this blog

How to make this program ask for input again if invalid input is entered (in C programming)? [duplicate]

Questions are taken from "C: How to Program" by Deitel and Deitel.

Assignment to develop a non-scientific calculator using C Language-81998