1. ## writing the pseudocode........functions

have an assign.
have to do an ipo chart.......unsure how to factor in the functions into the algorithm
i have to do both flowchart and pseudocode.......

the thing is......i've already written the code ....but i not sure what's expected in this ipo chart...........help?

2. this is my code:
Code:
```#include <iostream>
#include <cmath>
using namespace std;

{
double N1=0.0, N2=0.0, sum;
cout<<"Enter 2 numbers"<<endl;
cin>>N1>>N2;
sum=N1+N2;
return sum;

double subtract()
{
double N1=0.0,N2=0.0, diff;
cout<<"Enter 2 numbers"<<endl;
cin>>N1>>N2;
diff=N1-N2;
return diff;
}//end of function subtract

double divide()
{
double N1=0.0,N2=0.0,ans;
cout<<"Enter 2 numbers"<<endl;
cin>>N1>>N2;
ans=N1/N2;
return ans;
}//end of function divide

double multiply()
{
double N1=0.0, N2=0.0,prod;
cout<<"Enter 2 numbers"<<endl;
cin>>N1>>N2;
prod=N1*N2;
return prod;
}//end of function multiply

void compare()
{
double N1=0.0,N2=0.0;
cout<<"Enter 2 numbers"<<endl;
cin>>N1>>N2;
if(N1>N2)
{
cout<<"The 1st number is larger"<<endl;
}
else if(N1<N2)
{
cout<<"The 2nd number is larger"<<endl;
}
else
{
cout<<"The numbers are equal"<<endl;
}
}//end of function compare

float sqrt()
{
float SQR=0.0;
cout<<"Enter the number"<<endl;
cin>>SQR;
SQR=sqrt(SQR);
return SQR;
}//end of square root function
double power()
{
double N1=0.0,N2=0.0,ans;
cout<<"Enter 2 numbers. The second number being the POWER."<<endl;
cin>>N1>>N2;
ans=pow(N1,N2);
return ans;
}//end of function power

{
int choice;

while(choice!=8)
{

<<"Press 2 Subtract"<<endl
<<"Press 3 Divide"<<endl
<<"Press 4 Multiply"<<endl
<<"Press 5 Compare"<<endl
<<"Press 6 Square root"<<endl
<<"Press 7 Power"<<endl
<<"Press 8 Quit"<<endl;
cin>>choice;

if(choice==1)
{
}

else if (choice==2)
{
}

else if(choice==3)
{
}

else if (choice==4)
{
}
else if (choice==5)
{
compare();
}

else if (choice==6)
{
sqrt();
}

else if (choice==7)
{
power();
}

else
{
cout<<"Error in input data"<<endl;
}//end of if

}//end of while
if(choice==8)
{cout<<"Thank you for using my Calculator program."<<endl;}

3. A small bit of constructive criticism...

Although you can pseudo-code/flowchart your existing code, it would run counter to your assignment. Additionally, I would recommend completely ignoring your current code and pseudo-code / flowchart your menu from scratch. If you do that, I think you'll find a lot of redundant code in your current incarnation (hence the reason for pseudo-coding before authoring to begin with) .

Hint... focus on learning to pseudo-code switch statements, and passing values to functions, as well as returning values.

4. Originally Posted by Scribbler
A small bit of constructive criticism...

Although you can pseudo-code/flowchart your existing code, it would run counter to your assignment. Additionally, I would recommend completely ignoring your current code and pseudo-code / flowchart your menu from scratch. If you do that, I think you'll find a lot of redundant code in your current incarnation (hence the reason for pseudo-coding before authoring to begin with) .

Hint... focus on learning to pseudo-code switch statements, and passing values to functions, as well as returning values.
uh huh...thanx y
u sound like a pro...which i am not.....
far from...