Blasph Master Cheater
Reputation: 0
Joined: 21 Feb 2007 Posts: 275
|
Posted: Tue Nov 04, 2008 4:14 pm Post subject: Need help "/ |
|
|
Make a pseudocode that simulates a calculator with the following operations: /, Div, MOD, solves second degree equations, SQR, potentiation, and factorial.
This is what I have done till now:
Pseudocode calculator
Var
(Im putting these on the end because I dont know how many ill need..)
Begin
write ('What is the operation you choose? 1- for real division; 2- for quotient of the whole division; 3- rest of the whole division; 4- root of a second degree equation; 5- square of the number; 6- potentiation; 7- factorial')
read(choice)
Case (choice) is
'1':write('For which numbers do you want to apply the operation?')
read(real1,real2)
write(real1,'/',real2,'=',real1 / real2)
'2':write('For which numbers do you want to apply the operation?')
read(int1,int2)
write(int1,'DIV',int2,'=',int1 div int2)
'3':write('For which numbers do you want to apply the operation?')
read(int1,int2)
write(int1,'MOD',int2,'='int1 mod int2)
And I cant do the rest of the operations... By the way sorry for my english x)
|
|