Flowchart

so this is my code how, would i go about it to create a flowchart for it
#include <iostream>
#include <string>
#include <sstream>

using namespace std;
string intToStr(int num);
string reverseString(string const s);
int con[3];
int main() {

for(int i=999; i>=100; i--)
{
for(int j=i; j>=100; j--)
{
string palindrome = intToStr(i * j);
string reverse = reverseString(palindrome);
if(con[2] >= i * j)
break;
if (palindrome == reverse){
con[0] = i;
con[1] = j;
con[2] = i * j;
}
}
}
cout << "Largest Palindrome " << con[2] << endl;
cout << con[0] << " x " << con[1] << endl;
system("pause");
return 0;
}

string intToStr(int num) {
//takes an int and returns a string
stringstream ss;
ss << num;
return ss.str();
}
//returns the reverse of the input string without altering it
string reverseString(string const s) {
string rev = string(s.rbegin(), s.rend());
return rev;
}
will i have to create seperate flowcharts for the functions at the bottom
Topic archived. No new replies allowed.