Code match Pseudocode?

This is my code and I was wondering if it matched my pseudocode and if not how would I rearrange it to do so and any improvements I could make. The code works just wondering if it needs to be rearranged/improved. Any help is appreciated :)

--CODE--


#include <iostream>
#include <fstream>
#include <string>
using namespace std;

float check_Pythag(float DimA, float DimB, float DimC)
{
if (DimB*DimB + DimC*DimC == DimA*DimA)
{
return 'Yes';
}
else
{
return 'No';
}
}

int main()
{
float DimA; float DimB; float DimC;
string batch;

cout << "Pythagoras" << endl << endl;

cout << "Enter Batch No. :- ";
// This is were we enter the Batch code no.
cin >> batch;

while (batch != "0")
{

cout << "Enter Dimension A :-";
// At this stage we obtain Dimension A, B & C from the user.
cin >> DimA;

cout << "Enter Dimension B :-";
cin >> DimB;

cout << "Enter Dimension C :-";
cin >> DimC;

if (DimA <= DimB || DimA <= DimC)
// This calculates if Dimension A is indeed the longest (or biggest).
{
cout << "Invalid Data";
// If DimensionA is not longest report error to user - "Invalid Data".
std::cin.ignore(INT_MAX);
cin.get()
; // This code is here as once you input Dimension C the program would close.
}
else

if (check_Pythag(DimA, DimB, DimC) == 'Yes')
{
cout << endl << "Batch No. " << batch << " is Right Angled";
cout << endl << endl;
}
else
{
cout << endl << "Batch No. " << batch << " is not Right Angled";
cout << endl << endl;
}
cout << "Enter Another Batch No. (101 to exit) :- ";
cin >> batch;
}

}


--PSEUDOCODE--


module Main()
begin

get Batch code

while Batch code is greater than blank

get DimensionA
get DimensionB
get DimensionC
if DimensionA is not longest

report error to user – 'Invalid data'

else
call check_Pythagoras(DimensionA, DimensionB, DimensionC)

if result is 'Y'

show answer 'Batch code: X99 is right angled'
else

show answer 'Batch code: X99 is not right angled'

end if
end if

get Batch code

end while
end


module check_Pythagoras(DimA, DimB, DimC)

begin

if ADim squared equals Bdim squared plus CDim squared

return 'Y'

else

return 'N'

end if
end

Coders? :)
[code] "use code tags" [/code]
also, leave the pseudocode as comments of the snip they represent
Topic archived. No new replies allowed.