You are on page 1of 3

Alogorithm:

step1.start
step2.declare int ch;
step3.print statements.
Enter 1 to Add Numbers
Enter 2 to Substract Numbers
Enter 3 to Multiply Numbers
Enter 4 to Divide Numbers
enter 5 to square
enter 6 for cube
enter 7 for mod
Enter 0 To Exit
step 4.print statement
Enter the choice!!!!!!
Case 1: call to result,and enter the size of elments
And enter the elements .then call to add
For i=0 ,and repet the loop until i<n and then
Sum=sum+g[i] then print addition then break.
Case 2: call to result,and enter the size of elments
And enter the elements .then call sub
For i=0 ,and repet the loop until i<n and then
Sub=g[i]-sub then print substraction then break.
Case 3: call to result,and enter the size of elments
And enter the elements .then call mul.
For i=0 ,and repet the loop until i<n and then
mul=mul*g[i] then print multiplication
Case 4: call to result,and enter the size of elments
And enter the elements .then call div
For i=0 ,and repet the loop until i<n and then
div=div+g[i+1] then print division then break.
Case 5: call to square
And enter the element for find square .
Print the m *m for square then break.
Case 6: call to cube
And enter the elements for find cube .
Print the m *m *m for cube then break.
Case 7: call to result,and enter the size of elments
And enter the elements .then call mod.
For i=0 ,and repet the loop until i<n and then
mod=mod%g[i+1] then print modulus then break

default : print “enter valid choice!!!!!!!!!!!!!!”

step5.stop

You might also like