Saturday 5 March 2022

Practical No.4: Write a program to add, subtract, multiply and divide two numbers using arithmetic operators.

ACTIVITY 4

Practical No.4:
Write a program to add, subtract, multiply and divide two numbers using arithmetic operators.



ALGORITHM
step1: start
step2: Declare variables for numbers and operations
step3: Take Input from user as two numbers
step4: Perform addition, subtraction, multiplication and division by using arithmetic operation
step5: Print results of addition, subtraction, multiplication and division
step6: Stop

(Note: In below codes ,
  • on line number 7, we write division rather than div
  • on line number 25, we write Addition rather than sum
because the source code gave error on running.)


OR

By Sir Sajjad Akber Chandio






No comments:

Post a Comment