0% found this document useful (0 votes)
3 views6 pages

Math Operations on Number Sets

Math the

Uploaded by

lovely143yt
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

Math Operations on Number Sets

Math the

Uploaded by

lovely143yt
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Main

All 5-math operations on N-set of 2


nos.

Output "All 5-math


operations on N-set of 2
nos."

Integer N, ch

Output "For How many


Sets?"

Input N

String YN

Output "1. Addition 2.


Subtraction 3.
Multiplication
4. Division 5.
Reminder
Ur choice :: "

Input ch

False True
ch != 1

False True
Add( N )
ch != 2

False True
Sub( N )
ch != 3

False True
Mult( N )
ch != 4

False True
Div( N )
ch != 5

Remi( N ) Output "WRONG I/P !!!"

Output "Would like to


continue? ( Y / N )"

Input YN

True

Char( YN , 0 ) = "Y" or Char


( YN , 0 ) = "y"

False

Output "THANKS ! GOOD


BYE ! GOOD LUCK !"

End
Add
(Integer N)

Integer i

Integer Array A[N], B[N]

Next
i = 0 to N-1

Done
Output "Enter 2 nos. for " & i
+1 & "-Set Out Of " & N & "-
Sets."

Input A[i]

Input B[i]

Output A[i] & " + " & B[i] & " for " &
i+1 & "-Set Out Of " & N & "-
Sets. = " & A[i]+B[i]

End
Div
(Integer X)

Integer i

Integer Array A[X], B[X]

Next
i = 0 to X-1

Done
Output "Enter 2 nos. for " & i
+1 & "-Set Out Of " & X & "-
Sets."

Input A[i]

Input B[i]

False True
B[i] != 0

Output "WRONG I/P !!!" Output A[i] & " / " & B[i] & " for " & i
+1 & "-Set Out Of " & X & "-Sets.
= " & A[i]/B[i]

End
Mult
(Integer N)

Integer i

Integer Array A[N], B[N]

Next
i = 0 to N-1

Done
Output "Enter 2 nos. for " & i
+1 & "-Set Out Of " & N & "-
Sets."

Input A[i]

Input B[i]

Output A[i] & " * " & B[i] & " for " &
i+1 & "-Set Out Of " & N & "-
Sets. = " & A[i]*B[i]

End
REMI
(Integer X)

Integer i

Integer Array A[X], B[X]

Next
i = 0 to X-1

Done
Output "Enter 2 nos. for " & i
+1 & "-Set Out Of " & X & "-
Sets."

Input A[i]

Input B[i]

False True
A[i] > 0 AND B[i] > 0

Output "WRONG I/P !!!" Output A[i] & " % " & B[i] & " for
" & i+1 & "-Set Out Of " & X & "-
Sets. = " & A[i]%B[i]

End
Sub
(Integer N)

Integer i

Integer Array A[N], B[N]

Next
i = 0 to N-1

Done
Output "Enter 2 nos. for " & i
+1 & "-Set Out Of " & N & "-
Sets."

Input A[i]

Input B[i]

Output A[i] & " + " & B[i] & " for " &
i+1 & "-Set Out Of " & N & "-
Sets. = " & A[i]*B[i]

End

You might also like