-
Flowchart
Anyone know how to write a flowchart for this code?
#include<iostream>
#include <fstream>
using namespace std;
double amount = 0.0;
int main()
{
ofstream fout; //instance of output file stream
fout.open("Conversion.txt"); //opens the file, it will be in the same directory as the executable
cout<<"Currency Conversion"<<endl;
cout<<"--------------------\n";
cout<<"Enter the amount in US Dollar: ";
cin>>amount;
fout<<amount<<" US Dollars = "<<amount/0.6072<<" Swiss Francs\n";
fout<<amount<<" US Dollars = "<<amount/1.4320<<" British Pounds\n";
fout<<amount<<" US Dollars = "<<amount/0.0081<<" Japanese Yens\n";
fout<<amount<<" US Dollars = "<<amount/0.6556<<" Canadian Dollars\n";
fout<<amount<<" US Dollars = "<<amount/0.8923<<" Euros\n";
fout.close(); //closes the file, VERY IMPORTANT
return 0;
}
-
Sorry, but I really don't know what is flowchart(I'm from Slovakia, so nothing to wonder..)
And what is 'using namespace std;'? My compiler doesn't know how to compile it :) I guess it's something like #include..
-
What do want it in, visio?
-
Hmmm. Why not doing it yourself? It seems quite easy.
Hint: It is just a single line. There are no branches.
-
(Slightly offtopic: )
Namespaces are collections of functions that get an extra name in front of them. This is to prevent them from conflicting with functions that have the same name.
Some compilers do this automatically (MingW32, I know of), so they might not recognize it at all
(/Slightly offtopic: )
Can't be that hard to write a flowchart for that. I can't help though, as I don't use flowcharts.