Thread: Flowchart

  1. #1
    Registered User
    Join Date
    May 2002


    Anyone know how to write a flowchart for this code?

    #include <fstream>
    using namespace std;
    double amount = 0.0;

    int main()
    ofstream fout; //instance of output file stream"Conversion.txt"); //opens the file, it will be in the same directory as the executable

    cout<<"Currency Conversion"<<endl;


    cout<<"Enter the amount in US Dollar: ";


    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;

  2. #2
    Registered User
    Join Date
    Jun 2002
    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..

  3. #3
    Still A Registered User DISGUISED's Avatar
    Join Date
    Aug 2001
    What do want it in, visio?

  4. #4
    Join Date
    Aug 2001
    Groningen (NL)
    Hmmm. Why not doing it yourself? It seems quite easy.

    Hint: It is just a single line. There are no branches.

  5. #5
    Registered User
    Join Date
    Mar 2002
    (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.
    Typing stuff in Code::Blocks 8.02, compiling stuff with MinGW 3.4.5.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Flowchart Software?
    By Cell in forum Tech Board
    Replies: 2
    Last Post: 02-09-2009, 08:20 AM
  2. Flowchart Question
    By dmkanz07 in forum C Programming
    Replies: 1
    Last Post: 04-08-2007, 11:33 AM
  3. Flowchart question: Classes
    By darnok in forum C++ Programming
    Replies: 6
    Last Post: 06-17-2004, 06:25 PM
  4. Flowchart Program
    By jdm71488 in forum A Brief History of
    Replies: 4
    Last Post: 04-24-2004, 01:48 PM
  5. flowchart. Help!!!
    By chema124 in forum C Programming
    Replies: 3
    Last Post: 12-10-2002, 10:00 AM