Zahoor Ahmad

 

Home

C/C++

TQM

Data Analysis

Statistics

Computer

Contact

 

Computer Programming (C & C++)-1564

Problems for Practice of Arithmetic Operators :-

1

 

Write a program that calculates area of a square.  (Area = side *side)

 

 

 

 

 

 

2

  Write a program to calculate and print the result of following formula.

C=2ex+y + Cos(x+y)           where (x=2, y=3)

 

   

 

   

3

  Write a program that finds the roots of the quadratic equation

 ax2 + bx + c = 0.

 

   

4

  Write a program that takes input of three integer numbers, calculate the sum and product of the numbers and print out the results.

 

   

 

 

5

  Write a program that determines and prints the pay of an employee by calculating the allowances. Input the basic pay and the rate of various allowances are given below.

House rent                   =        45% of basic pay

Medical                        =        5% of basic pay

Conveyance                 =        10% of basic pay

Net Pay                       =        Basic Pay + House rent + medical + conveyance

 

6

  Write a program to calculate and print the results of the following formulae, values of x and y to be given by keyboard.

     

7

  Write a program to accept temperature in Centigrade and convert into Fahrenheit.

 

   

8

 

Write a program that reads temperature in Fahrenheit and calculate the Centigrade temperature

 

   

9

  Write a program that inputs a five-digit number, separates the number into its individual digits and prints the digits separated from one another by three spaces each. Also find the sum of individual digits.

 

   

10

  Write a program that inputs a five-digit number, find the number in reverse order. Also find the difference between the new number and the original number.
     
11   Write a program that takes a four digits integer from user and shows the digits on the screen separately i.e. if user enters 7531, it displays 7,5,3,1 separately.
     
12   Write a program that takes radius of a circle from the user and calculates the diameter, circumference and area of the circle and display the result.
     
13   Write a program to solve the following expressions

     
14   Calculate the length of the hypotenuse of a right triangle whose base and height are given.
     
15   Evaluate the formula y = 100(1+x+2e3x+x5), where x is given by the user.
     
16   Write a program to find arithmetic mean and variance of 5 values to be given by the user.

 

 

The End

 



 

If you find any advertisement showing some indecent material please report its web address (URL) on contact page. It will help us to block such websites to show their ads in future. Sorry for inconvenience.